We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

looking for the Event

hi all.
when the ggc is being loaded(after setting it's datasource), i would like to hook to the event and then change the backcolor of a row, if it's value equals somthing.
can you give me a simple example please?

1 Reply

AD Administrator Syncfusion Team February 12, 2007 05:18 PM UTC

Hi Shachar,

The GroupingGridControl is a column oriented grid. So you cannot set any cell specific properties like backcolor using property settings. To do this, you will have to subscribe the TableControlPrepareViewStyleInfo event (or QueryCellInfo event). In your handler, you check e.Style.CellValue and if this is valid than set e.Style.Backolor to the value you want. Also you can set the one flag value(IsEngineDataSourceChanged) )in the Engine.DataSourceChanged event of the grid and retrive that flag into the QueryCellInfo event for setting the rowcolor/cell color. Here is a minimal sample that shows you "How to change the RowColor/CellColor depends on the cellvalue?"

Sample : GGCRowBackColor.zip

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon