How do i highlight a row in Grid Control Virtual grid.

On the cell click event the entire row needs to be highlighted. How can this be done?

2 Replies

AD Administrator Syncfusion Team October 26, 2006 04:50 AM UTC

Hi Thales,

You can handle the PrepareViewStyleInfo event of the grid and set the e.Style.BackColor to some new color to want to display. Below is a code snippet.

//PrepareViewStyleInfo event
GridCurrentCell cc = this.grid.CurrentCell;
if( cc.RowIndex == e.RowIndex)
e.Style.BackColor = Color.AliceBlue;

Best Regards,
Haneef


VG Vijayarajan Govindarajan October 26, 2006 05:59 PM UTC

Hi Haneef,

It works. Thank You.

>Hi Thales,

You can handle the PrepareViewStyleInfo event of the grid and set the e.Style.BackColor to some new color to want to display. Below is a code snippet.

//PrepareViewStyleInfo event
GridCurrentCell cc = this.grid.CurrentCell;
if( cc.RowIndex == e.RowIndex)
e.Style.BackColor = Color.AliceBlue;

Best Regards,
Haneef

Loader.
Up arrow icon