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

Row Formatting

how to format a row value in syncfusion Grid Grouping Contro.
reply urgently

1 Reply

JJ Jisha Joy Syncfusion Team August 6, 2009 06:37 AM UTC

Hi Rohit,

In GridGroupingControl we need to handle either QueryCellStyleInfo event or TableControlPrepareViewStyleInfo event for applying row styles. See the code:

//Handler for QueryCellStyleInfo event
void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.RowIndex == 5)
{
e.Style.BackColor = Color.CornflowerBlue;
e.Style.TextColor = Color.White;
e.Style.Font.Bold = true;
e.Style.Font.Italic = true;
}
}

// Handler for TableControlPrepareViewStyleInfo event
void gridGroupingControl1_TableControlPrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlPrepareViewStyleInfoEventArgs e)
{
if (e.Inner.RowIndex == 5)
{
e.Inner.Style.BackColor = Color.CornflowerBlue;
e.Inner.Style.TextColor = Color.White;
e.Inner.Style.Font.Bold = true;
e.Inner.Style.Font.Italic = true;
}
}


We hope we have been able help with your technical support inquiries in this Forum. In addition to our Community Forums, we have other customized support avenues like our Direct Trac Developer Support System https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents and we hope you will take advantage of this system as well.

Thank you for your participation in Syncfusion’s Community Forums”.

Regards,
Jisha



Loader.
Live Chat Icon For mobile
Up arrow icon