I
I
Ilya2016-06-03 10:53:49
C++ / C#
Ilya, 2016-06-03 10:53:49

How to color a row in SourceGrid depending on the data?

Good day. I use the table SourceGrid.DataGrid. I have a field with type bool (true or false) in my data collection. How can I colorize the entire line in the desired color if this field = true ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
saltydogd, 2016-06-06
@saltydogd

Let's say
www.codeproject.com/Articles/3531/SourceGrid-Open-...
then
SourceGrid.Cells.Views.Cell view = new SourceGrid.Cells.Views.Cell();
view.BackColor = Color.Red;
then iterate over the line with the condition and
oGrid_1[r,c].View = view;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question