I want to know how to get the DataGridCell from DataGridCellInfo. Actually i have a some selected cells in datagrid, and SelectedCells property return DataGridCellInfo’s collection, but i want to change the background of those cells at runtime too. so i need the datagrid cell.
kindly suggest me how to do so and also how to change the datagrid cell background color dynamically(through code) also.
Thanks
To change the color of the cell dynamically this is the simplest way
cell.Background = new SolidColorBrush(Colors.Green);
and to get the datagrid cell, follow this link
WPF Datagrid: Programmatically editing a cell
Thanks to Natxo