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

How can I change a row color by a data value

Thread ID:

Created:

Updated:

Platform:

Replies:

32909 Aug 10,2005 04:10 AM UTC Oct 6,2005 02:09 PM UTC WinForms 3
loading
Tags: FAQ
Suite
Asked On August 10, 2005 04:10 AM UTC

I want to change a row color to red when a data value == 1. How can I do that in datagrid in C# winForm?

SiD
Replied On October 6, 2005 02:09 PM UTC

Override the paint method. Object o = this.DataGridTableStyle.DataGrid[rowNum,]; int chk = Convert.ToInt32(o); if(chk == 1) { foreBrush = new SolidBrush(Color.Blue); }

SiD
Replied On October 6, 2005 02:09 PM UTC

Override the paint method. Object o = this.DataGridTableStyle.DataGrid[rowNum,]; int chk = Convert.ToInt32(o); if(chk == 1) { foreBrush = new SolidBrush(Color.Blue); }

SiD
Replied On October 6, 2005 02:09 PM UTC

Override the paint method. Object o = this.DataGridTableStyle.DataGrid[rowNum,]; int chk = Convert.ToInt32(o); if(chk == 1) { foreBrush = new SolidBrush(Color.Blue); } >I want to change a row color to red when a data value == 1. >How can I do that in datagrid in C# winForm?

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

;