Home All Groups Group Topic Archive Search About

stupid questions re: DatagridView

Author
8 Jun 2006 4:23 PM
Bill Nguyen
1. Where to put the header/banner/caption text for a Datagridview? I want to
label the DGV "my 2nd DGV"

2. How do I set alternate row background color? I want light gray and
yellow-green alternately.

Thanks

Bill

Author
8 Jun 2006 4:33 PM
IdleBrain
Hello:

> 1. Where to put the header/banner/caption text for a Datagridview? I want to
> label the DGV "my 2nd DGV"

urDatagrid. CaptionText = "my 2nd DGV"


> 2. How do I set alternate row background color? I want light gray and
> yellow-green alternately.

urDatagrid.AlternatingBackColor = System.Drawing.Color.LightGray
urDatagrid.BackColor = System.Drawing.Color.YellowGreen

Hope it helps.
Author
8 Jun 2006 4:46 PM
Bill Nguyen
Hello;

I'm talking about DatagridView, not Datagrid. Those properties not found in
DatagridView.

Thanks for your help anyway :-)

Bill

Show quoteHide quote
"IdleBrain" <indianmostwan***@yahoo.com> wrote in message
news:1149784424.289262.113570@i39g2000cwa.googlegroups.com...
>
> Hello:
>
>> 1. Where to put the header/banner/caption text for a Datagridview? I want
>> to
>> label the DGV "my 2nd DGV"
>
> urDatagrid. CaptionText = "my 2nd DGV"
>
>
>> 2. How do I set alternate row background color? I want light gray and
>> yellow-green alternately.
>
> urDatagrid.AlternatingBackColor = System.Drawing.Color.LightGray
> urDatagrid.BackColor = System.Drawing.Color.YellowGreen
>
> Hope it helps.
>
Author
8 Jun 2006 5:51 PM
Scott Collier
DGV.Name ="whatever"

where DGV is your DataGridView

Regards
Scott

Show quoteHide quote
"Bill Nguyen" <billn_nospam_please@jaco.com> wrote in message
news:OAvRjsxiGHA.1272@TK2MSFTNGP03.phx.gbl...
> Hello;
>
> I'm talking about DatagridView, not Datagrid. Those properties not found
> in DatagridView.
>
> Thanks for your help anyway :-)
>
> Bill
>
> "IdleBrain" <indianmostwan***@yahoo.com> wrote in message
> news:1149784424.289262.113570@i39g2000cwa.googlegroups.com...
>>
>> Hello:
>>
>>> 1. Where to put the header/banner/caption text for a Datagridview? I
>>> want to
>>> label the DGV "my 2nd DGV"
>>
>> urDatagrid. CaptionText = "my 2nd DGV"
>>
>>
>>> 2. How do I set alternate row background color? I want light gray and
>>> yellow-green alternately.
>>
>> urDatagrid.AlternatingBackColor = System.Drawing.Color.LightGray
>> urDatagrid.BackColor = System.Drawing.Color.YellowGreen
>>
>> Hope it helps.
>>
>
>
Author
9 Jun 2006 12:34 AM
Bill Nguyen
Scott;

I can't even see the title bar of the DGV! Your syntax only change the name
at runtime, I think.

Thanks
Bill
Show quoteHide quote
"Scott Collier" <nospamplease@this.address> wrote in message
news:448863bd$1@quokka.wn.com.au...
> DGV.Name ="whatever"
>
> where DGV is your DataGridView
>
> Regards
> Scott
>
> "Bill Nguyen" <billn_nospam_please@jaco.com> wrote in message
> news:OAvRjsxiGHA.1272@TK2MSFTNGP03.phx.gbl...
>> Hello;
>>
>> I'm talking about DatagridView, not Datagrid. Those properties not found
>> in DatagridView.
>>
>> Thanks for your help anyway :-)
>>
>> Bill
>>
>> "IdleBrain" <indianmostwan***@yahoo.com> wrote in message
>> news:1149784424.289262.113570@i39g2000cwa.googlegroups.com...
>>>
>>> Hello:
>>>
>>>> 1. Where to put the header/banner/caption text for a Datagridview? I
>>>> want to
>>>> label the DGV "my 2nd DGV"
>>>
>>> urDatagrid. CaptionText = "my 2nd DGV"
>>>
>>>
>>>> 2. How do I set alternate row background color? I want light gray and
>>>> yellow-green alternately.
>>>
>>> urDatagrid.AlternatingBackColor = System.Drawing.Color.LightGray
>>> urDatagrid.BackColor = System.Drawing.Color.YellowGreen
>>>
>>> Hope it helps.
>>>
>>
>>
>
>
Author
8 Jun 2006 4:53 PM
Bill Nguyen
I found answer for #2.

http://msdn2.microsoft.com/en-us/library/system.windows.forms.datagridview.alternatingrowsdefaultcellstyle.aspx

Still need help on #1.

Thanks
Bill

Show quoteHide quote
"IdleBrain" <indianmostwan***@yahoo.com> wrote in message
news:1149784424.289262.113570@i39g2000cwa.googlegroups.com...
>
> Hello:
>
>> 1. Where to put the header/banner/caption text for a Datagridview? I want
>> to
>> label the DGV "my 2nd DGV"
>
> urDatagrid. CaptionText = "my 2nd DGV"
>
>
>> 2. How do I set alternate row background color? I want light gray and
>> yellow-green alternately.
>
> urDatagrid.AlternatingBackColor = System.Drawing.Color.LightGray
> urDatagrid.BackColor = System.Drawing.Color.YellowGreen
>
> Hope it helps.
>