By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,925 Members | 732 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,925 IT Pros & Developers. It's quick & easy.

Alternate Row Color for entire grid

P: n/a
B.
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.

May 2 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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#
May 3 '07 #2

P: n/a
B.
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#

May 17 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.