471,627 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,627 software developers and data experts.

Setting first column of the datagrid to zero?

Hi!

A question concerning the datagrid component in Visual Studio .NET 2003

I cannot seem to find any documentation about setting the first column
(column 0) to zero, that is: make it invisible.

But I know from experience with these groups that there may always be a
chance somebody know after all.

Thanks,

Me.Name

Dec 6 '05 #1
2 1130
You can always remove the DataGridColumnStyle that corresponds to the
column in the table from the column styles collection, and then it won't be
shown.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<gs***@hotmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Hi!

A question concerning the datagrid component in Visual Studio .NET 2003

I cannot seem to find any documentation about setting the first column
(column 0) to zero, that is: make it invisible.

But I know from experience with these groups that there may always be a
chance somebody know after all.

Thanks,

Me.Name

Dec 6 '05 #2
Well, the problem(?) is that I haven't defined any as I just load some
data from a table (SQL DB 2000). So in this case I don't need the
default column 0 in this component. The user will not need to edit any
data in this case. The data is being loaded through the simple

oleDbDataAdapter2.Fill(dsSimpleInfo1);

in the btnLoad_Click.

I remember in Delphi 6 & 7 you could always remove the default row or
column by simply setting it to 0 in the property sheet. I was kind of
hoping it should be this easy here too. May be I expect too much?

(I hope I've made myself clear that I'm talking about the column 0 of
the component and not the column 0 of the columns I receive from the
underlying table) :-)

Thanks,

Me.Name


Dec 7 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Laura | last post: by
1 post views Thread by TT (Tom Tempelaere) | last post: by
4 posts views Thread by Localbar | last post: by
1 post views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.