How to edit an unbound cell in a bound DataGrid?

So I have a DataGrid bound to a data source (using ADO.NET), I created a new local column (it doesn't need to exist in database). I do some calculations and then put the results in that column. Now, I know how to edit/access the bound cells via DataSet, but I don't know how to do it for the cells of that new column because it's not in the DataSet. I want to iterate each row and edit the cell value of the new column. Any help is appreciated.


For anyone else who comes to this page, adding the following attribute to my DataGrid 's declaration did the trick for me:

SelectedItemBinding="{Binding /}"

For more information, please check this question.

链接地址: http://www.djcxy.com/p/71120.html

上一篇: 如何根据单元格值更改wpf Databound网格单元格?

下一篇: 如何编辑绑定的DataGrid中的未绑定单元格?