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

GGC Selection

hi I''ve a GGC which contains cells of type textbox, checkboxes .I want to change the backcolor of the checked columns inthe GGC.ie,checked columns should be of one color,unchecked should be of some other color & textbox some other color. How can I do this? thanks prethi

2 Replies

ST stanleyj Syncfusion Team January 9, 2006 03:52 PM UTC

Hi Prethi, The style properties of GGC are to done in TableControlPrepareViewStyleInfo or QueryCellStyleInfo handlers. private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e) { if(e.TableCellIdentity.Column != null) if(e.TableCellIdentity.Column.Name == "check/uncheck" && e.Style.CellType == "CheckBox" && Convert.ToBoolean(e.Style.CellValue)) e.Style.BackColor = Color.Pink; else e.Style.BackColor = Color.Yellow; if(e.Style.CellType == "TextBox") e.Style.BackColor = Color.LightSteelBlue; } Best regards, Stanley


AD Administrator Syncfusion Team January 10, 2006 09:01 AM UTC

thanks >Hi Prethi, > >The style properties of GGC are to done in TableControlPrepareViewStyleInfo or QueryCellStyleInfo handlers. > > private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e) > { > if(e.TableCellIdentity.Column != null) > if(e.TableCellIdentity.Column.Name == "check/uncheck" && e.Style.CellType == "CheckBox" && Convert.ToBoolean(e.Style.CellValue)) > e.Style.BackColor = Color.Pink; > else > e.Style.BackColor = Color.Yellow; > > if(e.Style.CellType == "TextBox") > e.Style.BackColor = Color.LightSteelBlue; > } > >Best regards, >Stanley

Loader.
Live Chat Icon For mobile
Up arrow icon