Setting first column of the datagrid to zero?

  • Thread starter Thread starter gsb58
  • Start date Start date
G

gsb58

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
 
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.
 
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) :-)
 
Back
Top