Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default Creating Datarow

    I can add a datacolumn to a datarow at any time.
    How can I add a datarow to a table in a dataset?
    Arne Guest

  2. Similar Questions and Discussions

    1. DataRow
      hello all, are the datarow index mantained when DataTable is sorted by clicking on the column header? that is .. if the first row is index 1,...
    2. Using Datarow, how do I get the data out of each
      column in the current row? For example, I have a datagrid filled up with a database and the user clicks on the edit button. I want to go to another...
    3. Is e.Item.DataItem (DataRow) available on postback??
      Hi, I'm having trouble accessing e.Item.DataItem on postback, specifically in the ItemCommand event. e.Item.DataItem is returned as null. I...
    4. DataRow, WebService question
      I am writing a WindowsForms based application that uses WebServices to add records to a SQL Server database, and later query those, and other...
    5. Convert DataRow content to bool
      Hi Have you tried (bool)dr ? If field is of type bool it should be ok. Hope this help, -- Ignacio Machin,
  3. #2

    Default Re: Creating Datarow

    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" <Arne@discussions.microsoft.com> wrote in message
    news:E8D17EBA-C4D4-4FCB-BC80-207ADE037CDC@microsoft.com...
    >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 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139