DataGridView

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello there,
this is my first time playing with the DataGridView control.
What I have is an array of integers and i would like them displayed in the
grid.
I would like to have the row headers numbered.

What is the best approach?
Should I try databind?
Is there a property for numbered row headers?
I'm totally at a loss here as i never used DataGrid 1.1 so any pointers in
correct direction would be greatly appreciated.

Thanks for your time
Brian
 
Create a DataTable whatever the columns u want to display in the Grid + with
a DataColumn for Row Header. For eg:
table.Columns.Add("ID", typeof(int));
DataColumn[] colArray = new DataColumn[1];
colArray[0].Unique = true;
colArray[0] = table.Columns["ID"];
colArray[0].AutoIncrement = true;

Regards,
Dhanushka
 
Back
Top