c# - how to update a cell in DataGrid which is binded with string[][] array -


The DataSource array is the source data for this datagrid.

I have DataGrid and a string [] [] I use the following code to set binding:

  dataGrid.ItemsSource = DataSource; (Int i = 0; i & lt; column; i ++) {dataGrid.Columns.Add (New DataGridTextColumn {binding = new binding (string.format ("[{0}]", i))}) ; }  

How can I update a notification in a cell in the data grid when the value [i] [j] was changed in the string?

If the data items that you are bound to implement, then the INOTifyPropertyChanged update automatically Because the data will transmit the item / collection that an asset has changed, and the datagrid will be automatically updated without updating (manual grid refunds may be slower depending on the amount of data).

So if you change the data structure that you are bound to string, it is something that implements INotifyPropertyChanged (even if you object yourself, which is easy to do). And set the grid to automatically create columns, then you need to do this DataGrid.ItemSource property and essentially update the personal data object.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -