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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Entire row backcolor

Thread ID:





59495 Apr 15,2007 09:48 AM UTC Apr 15,2007 06:07 PM UTC WinForms 1
Tags: GridControl
Miki Watts
Asked On April 15, 2007 09:48 AM UTC

I'm using a DataBoundGrid.
I'm trying to change the backcolor of an entire row based on the value in a single cell in that row.

I've tried something like this:
private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
if (gridDataBoundGrid1[e.RowIndex, e.ColIndex].CellValueType == typeof (string))
if ((string) gridDataBoundGrid1[e.RowIndex, e.ColIndex].CellValue == "001")
GridRangeInfo range =

GridStyleInfo style = new GridStyleInfo();
style.BackColor = Color.Red;

gridDataBoundGrid1.Model.ChangeCells(range, style, StyleModifyType.Override);

but it causes a stackoverflow when moving out of the cell and back, and doesn't change the backcolor of the row.

What would be the standard way to do something like this?

Miki Watts
Replied On April 15, 2007 06:07 PM UTC

problem solved, thanks.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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