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

GridDataBoundGrid selected cell coloring

Simple as that. I can't find any way to specify the behaviour of cells which are selected. They all come out a nasty xor color (i.e. black = white, blue = orange).


2 Replies

JP Jeya Preetha M Syncfusion Team June 25, 2012 07:01 AM UTC

Hi Ian,

To perform the desired requirement, please make use of "CurrencellValidating" and appply color for the current cell.

 

Please let me know if you have any concerns.

Reagrds,

Jeya Preetha M



JP Jeya Preetha M Syncfusion Team June 26, 2012 03:44 AM UTC

Hi Ian,

Please ignore my previous update.

To perform coloring for the selected color, please make use of QueryCellInfo event and please refer the following code snippet:

this.gridControl1.Selections.Clear();

void gridControl1_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)

{

if (this.gridControl1.CurrentCell.HasCurrentCellAt(e.RowIndex))

{

e.Style.BackColor = Color.Red;

}

}    

In that sample coloring is perfomed while click on the cell.

Please let me know if you have any concerns.

Reagrds,

Jeya Preetha M


Loader.
Live Chat Icon For mobile
Up arrow icon