PC Review


Reply
Thread Tools Rate Thread

Background color of datagrid of specific rows

 
 
Harsh
Guest
Posts: n/a
 
      19th Nov 2003
How to change background of rows of the datagrid based
on value of some particular column of the row in the
datagrid.

I am currently filling in the data into the grid using the
dataset. Now based on the values in certain column i want
to change the back ground colour of the row.

This change in colour required is NOT necessarily in any
specific order.

Now this specifically need to be done on Compact Framework.

Any help is appreciated.

Thanks a lot in advance.

Harsh


 
Reply With Quote
 
 
 
 
Alex Feinman [MVP]
Guest
Posts: n/a
 
      19th Nov 2003
Take a look at http://www.opennetcf.org/Forums/topic.asp?TOPIC_ID=350
The sample code actually creates alternating rows, but it should be easy to
modify it to choose a color based on the row content. Keep in mind, this
relies on the knowledge of the DataGrid control iternal structure and can
potetnially stop working after a Service Pack or major release (most likely)

"Harsh" <(E-Mail Removed)> wrote in message
news:001c01c3aeb0$5488bb70$(E-Mail Removed)...
> How to change background of rows of the datagrid based
> on value of some particular column of the row in the
> datagrid.
>
> I am currently filling in the data into the grid using the
> dataset. Now based on the values in certain column i want
> to change the back ground colour of the row.
>
> This change in colour required is NOT necessarily in any
> specific order.
>
> Now this specifically need to be done on Compact Framework.
>
> Any help is appreciated.
>
> Thanks a lot in advance.
>
> Harsh
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change back color of specific rows in datagrid =?Utf-8?B?QW1iaWNhIEphaW4=?= Microsoft C# .NET 1 19th Sep 2006 10:39 PM
RE: Background color of individual rows in a DataGrid =?Utf-8?B?VFQgKFRvbSBUZW1wZWxhZXJlKQ==?= Microsoft C# .NET 0 16th Sep 2004 05:29 PM
RE: Background color of individual rows in a DataGrid =?Utf-8?B?VFQgKFRvbSBUZW1wZWxhZXJlKQ==?= Microsoft C# .NET 0 16th Sep 2004 04:09 PM
Background color of individual rows in a DataGrid =?Utf-8?B?VFQgKFRvbSBUZW1wZWxhZXJlKQ==?= Microsoft C# .NET 0 16th Sep 2004 03:33 PM
Changing row background color of individual rows in Datagrid Johnsen Microsoft Dot NET Framework Forms 0 28th Jul 2003 09:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:48 AM.