DataGridView

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brian Keating

    #1

    DataGridView

    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
  • Dhanushka Nuwan

    #2
    Re: DataGridView

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

    Regards,
    Dhanushka





    "Brian Keating" <csharp at briankeating.ne t> wrote in message
    news:F3705950-EE8A-4737-86F8-2B89E4CAAA88@mi crosoft.com...[color=blue]
    > 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[/color]


    Comment

    Working...