Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

WPF DataGrid. Change single cell background.

$
0
0

Hi,

I need to change the background colour of a certain cell in a DataGrid that is bound to a DataTable, is this possible? I cannot find a list of cells or cell styles anywhere.

I know the column and row of its location in the DataTable. So, in pseudo code, it would be:

var cell = dgData.Cells[columnIndex,rowIndex];

cell.Background = new SolidBrush(Colours.AliceBlue);

Cheers,
Jose


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>