Creating Datarow

Discussion in 'ASP .Net Datagrid Control' started by Arne, Nov 15, 2005.

  1. Arne

    Arne Guest

    I can add a datacolumn to a datarow at any time.
    How can I add a datarow to a table in a dataset?
    Arne, Nov 15, 2005
    #1
    1. Advertising

  2. Arne

    Elton Wang Guest

    DataColumn col = New DataColumn("colName",Type.GetType("System.String");
    datatable.Columns.Add(col);

    DataRow row = datatable.NewRow();
    // assign data to the row
    datatable.Rows.Add(row);


    HTH


    "Arne" <> wrote in message
    news:...
    >I can add a datacolumn to a datarow at any time.
    > How can I add a datarow to a table in a dataset?
    Elton Wang, Nov 15, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ignacio Machin

    Re: Convert DataRow content to bool

    Ignacio Machin, Jul 7, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    371
    Ignacio Machin
    Jul 7, 2003
  2. Eliyahu Goldin

    Re: Convert DataRow content to bool

    Eliyahu Goldin, Jul 7, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    355
    Eliyahu Goldin
    Jul 7, 2003
  3. Ron Vecchi
    Replies:
    1
    Views:
    673
    Ron Vecchi
    Jul 27, 2003
  4. Ron Vecchi
    Replies:
    0
    Views:
    390
    Ron Vecchi
    Jul 30, 2003
  5. Ron Vecchi
    Replies:
    0
    Views:
    414
    Ron Vecchi
    Jul 31, 2003
Loading...

Share This Page