HA
haneefm
Syncfusion Team
April 27, 2007 09:08 PM UTC
Hi Jiri,
You can try this code.
gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.One;
gridGroupingControl1.TableOptions.SelectionBackColor = Color.Red;
Best regards,
Haneef
KB
Karsten Brocksieper
June 26, 2008 09:52 AM UTC
Hello,
this works really good.
I have one more question regarding this issue. With this code the clicked row change the backcolor --- but not the clicked cell. The backcolor of the clicked cell don´t change.
Is it possible to change the color of the clicked cell too?
Regards,
Karsten
JJ
Jisha Joy
Syncfusion Team
June 27, 2008 10:34 AM UTC
Hi Karsten,
This can be achieved by handling the QueryCellStyleInfo event. Please refer the code:
void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell;
if (e.TableCellIdentity.RowIndex == cc.RowIndex && e.TableCellIdentity.ColIndex == cc.ColIndex)
{
e.Style.BackColor = this.gridGroupingControl1.TableOptions.SelectionBackColor;
this.gridGroupingControl1.TableControl.RefreshRange(GridRangeInfo.Cell(cc.RowIndex, cc.ColIndex));
}
}
Regards,
Jis