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. Advertisements

  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. Advertisements

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. Ron Vecchi
    Replies:
    1
    Views:
    835
    Ron Vecchi
    Jul 27, 2003
  2. Ron Vecchi
    Replies:
    0
    Views:
    497
    Ron Vecchi
    Jul 30, 2003
  3. Ron Vecchi
    Replies:
    0
    Views:
    503
    Ron Vecchi
    Jul 31, 2003
  4. Michael Carr

    Reading SqlDataReader or DataRow

    Michael Carr, Nov 28, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    9,324
  5. Doug
    Replies:
    0
    Views:
    1,100
  6. reiks

    datarow-datgriditem

    reiks, Dec 29, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,152
    Natty Gur
    Dec 29, 2003
  7. Chet
    Replies:
    3
    Views:
    153,803
  8. =?Utf-8?B?RmF0Ym95Q2FudGVlbg==?=

    DataRow Copy

    =?Utf-8?B?RmF0Ym95Q2FudGVlbg==?=, Jan 30, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    923
    =?Utf-8?B?RmF0Ym95Q2FudGVlbg==?=
    Jan 30, 2004
Loading...