PC Review


Reply
Thread Tools Rate Thread

Alternate Row Color for entire grid

 
 
B.
Guest
Posts: n/a
 
      2nd May 2007
I am able to set the alternate row color using
AlternatingRowsDefaultCellStyle. however, if my grid is not fully
filled, the alternate row color will not apply for blank rows. How can
I fill the blank rows with alternate color as well. Thanks.

 
Reply With Quote
 
 
 
 
Oliver Sturm [MVP C#]
Guest
Posts: n/a
 
      3rd May 2007
Hi,

B. wrote:

> I am able to set the alternate row color using
> AlternatingRowsDefaultCellStyle. however, if my grid is not fully
> filled, the alternate row color will not apply for blank rows. How can
> I fill the blank rows with alternate color as well. Thanks.


You're not mentioning what grid control you're talking about, so obviously
it's hard to give a correct answer. But in any case I would suspect that
unless there's a specific option for the behaviour you want, it's just the
way they implemented it. Most grid controls that I have seen have some form
of custom drawing functionality and you should be able to draw the
alternating colors in the free space yourself. How easy that is would
depend on the quality of the extensibility API provided.


Oliver Sturm
--
http://www.sturmnet.org/blog - MVP C#
 
Reply With Quote
 
B.
Guest
Posts: n/a
 
      17th May 2007
Hi Oliver,

I am using .Net 2.0 DataGridView in C#.

On May 3, 10:20 am, "Oliver Sturm [MVP C#]" <oli...@sturmnet.org>
wrote:
> Hi,
>
> B. wrote:
> > I am able to set the alternate row color using
> > AlternatingRowsDefaultCellStyle. however, if my grid is not fully
> > filled, the alternate row color will not apply for blank rows. How can
> > I fill the blank rows with alternate color as well. Thanks.

>
> You're not mentioning what grid control you're talking about, so obviously
> it's hard to give a correct answer. But in any case I would suspect that
> unless there's a specific option for the behaviour you want, it's just the
> way they implemented it. Most grid controls that I have seen have some form
> of custom drawing functionality and you should be able to draw the
> alternating colors in the free space yourself. How easy that is would
> depend on the quality of the extensibility API provided.
>
> Oliver Sturm
> --http://www.sturmnet.org/blog- MVP C#



 
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
Alternate Row Color? Dan Microsoft Outlook Discussion 1 21st Feb 2008 04:05 PM
alternate sorting for grid view =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?= Microsoft ASP .NET 2 25th May 2007 03:28 PM
how do I get grid lines over the entire page? =?Utf-8?B?Qnlyb24=?= Microsoft Excel Misc 2 12th Jan 2007 01:38 AM
Color alternate Entire row dependant on value in "A" Les Microsoft Excel Programming 6 6th Nov 2006 07:34 PM
Form layout -- any add on tools to do this? Or alternate way besides the standard grid etc? JohnS@hawaii.rr.com Microsoft Access Forms 2 2nd May 2006 05:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:07 AM.