set color cell in GridGroupingControl

How do I color a individual cell width changed values?

4 Replies

AD Administrator Syncfusion Team August 23, 2006 04:19 AM UTC

Hi Vitaliy,

In a GroupingGrid, you cannot set cell specific properties like BackColor (other than CellValue or Text) using an indexer. The reason is that in a GroupingGrid, the only data storage is the bound datasource. That only holds a single value. It does not hold TextColor, or Backcolor, or any of the other many cell specific properties. So, in order to set cell specific properties in a GroupingGrid, you must catch the TableControlPrepareViewStyleInfo event (or QueryCellStyleInfo event). In your handler, you check RowIndex and ColIndex, and if these point to the cell you want to change, you set Style to the value you want. Please refer the sample for more details.

Here is a sample.
http://www.syncfusion.com/Support/user/uploads/Color_de5c5c51.zip

Let me know if this helps.
Best Regards,
Haneef


VI Vitaliy August 23, 2006 01:01 PM UTC

Prompt me how to define (find) cells with the changed values? How GridGroupingControl.Table. Records[] are connected with DataSet.Rows[]?
Thanks for the answer.


AD Administrator Syncfusion Team August 24, 2006 12:45 PM UTC

Hi Sathish,

I have created a sample as per your specification. The sample illustrates the possiblity to change the color of the cell when the cell text is changed. Please refer to the attached sample and let me know if you are trying something different.

Here is a sample.
http://www.syncfusion.com/Support/user/uploads/GridColorChanges_607b4fad.zip

Let me know if this helps.
Best Regards,
Haneef


VI Vitaliy August 25, 2006 08:53 AM UTC

Thanks for the help

Loader.
Up arrow icon