Datagrid not updating dating basic training
4) If the work thread add new rows to the Data Table, then the new row will not shown on the Data Grid.
This is very big problem for us, can you fix them asap?
The Data Grid is defined like this in the view: The View Model sets up the datatable by reading a text file, and adds two boolean values to the end of each row. I found a simple solution, that trying to parse this answer led me to, but without actually every fully testing or groking this answer.
I want the boolean values to map to the checkboxes in the Data Grid, but they don't, and I don't get any events in the viewmodel when the values are changed. But I will accept because I think it led me down the path that seems to work. While I try to avoid code behind, I think my use in this solution is acceptable, as the view is simply preparing to display the View Model which has a dynamic size (or shape).
I have a WPF Data Grid bound to an Observable Collection called "Personnel".
I have a Data Grid Check Box Column in the Data Grid that is editable.
All 3 of your answers led me to the solution as it was a combination of things, but yours encompassed most of the issue.
I had a space at the end of my string in my Notify Property Changed event.
I also don't like how it refreshes the whole grid and deselects my current selection Thank you!
The Check Box Column is bound to a bool value called "Aircraft Commander Selected" in my collection.
When a row is selected and the checkbox is checked, an event is fired to update the collection so that all Aircraft Commander Selected values for each "Personnel" are set to false (except for the one that was just set to true). Class When the collection is modified and the property changed event is fired, shouldn't the datagrid update?
Please use dg Data Of Index unless you have a later version.
This thread looks to be a little on the old side and therefore may no longer be relevant.By the way, did you have any chance to work on the efficiency problem on huge datatable, see the thread.