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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridDataBoundGrid selected cell coloring

Thread ID:

Created:

Updated:

Platform:

Replies:

104070 Jun 19,2012 01:47 PM UTC Jun 26,2012 03:44 AM UTC Windows Forms 2
loading
Tags: GridControl
ian bradley
Asked On June 19, 2012 01:47 PM UTC

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).


Jeya Preetha M [Syncfusion]
Replied On 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


Jeya Preetha M [Syncfusion]
Replied On 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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;