WPF DataGrid set a value to a cell from code

Mar 16, 2010 at 12:56 PM


After searching for day's on the internet without finding answers I wonder if it is possible to set a value to a  WPF DataGrid cell from code. I find lot's of tricks to get a value from a cell but not to set a value to a cell.

In my case I have a DataGrid and one of the columns contains a path to a document. Via a DataGridTemplateColumn I added a button in each row. The click_event of the button opens the OpenFileDialog and I would like store the selected path of the OpenFileDialog in a specifique cell of the currentrow. Is there a way to realise this? 

I'm using the latest version of WPF Toolkit.