DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Creating new row in .NET Data table

  1. #1
    Join Date
    Oct 2005

    Creating new row in .NET Data table


    I like to know how to create a new row in the .NET datatable . I have a save button which user will click after entering data in the datagrid . once user click on the save button a new row will generate in the data table for the information user has entered in the datagrid . The databale will save the information into the database table . How do I generate new rows in the datatable . Please show me some code


  2. #2
    Join Date
    Dec 2004
    // Create new DataTable and DataSource objects.
    DataTable myDataTable = new DataTable();
    // Declare DataRow variables.
    DataRow myRow;

    myRow = myDataTable.NewRow();
    myRow["id"] = 1;
    myRow["item"] = "item 001" ;

    More Info:
    Best Regards,
    Michael Sync

    The more you share,The more you get

Similar Threads

  1. Updating on screen text fields with multiple table data
    By William Ed Carden in forum VB Classic
    Replies: 2
    Last Post: 10-17-2005, 05:09 PM
  2. Java vs. .Net. A questionnaire
    By Basil in forum .NET
    Replies: 1
    Last Post: 05-13-2005, 06:46 AM
  3. ANN: MySQLDirect .NET Data Provider 1.80 has released
    By Core Lab in forum dotnet.announcements
    Replies: 0
    Last Post: 10-01-2003, 11:39 AM
  4. row level triggers
    By Ervin Rodriguez in forum Database
    Replies: 3
    Last Post: 02-07-2002, 07:21 PM
  5. Multi-row calculations
    By Bob Hines in forum Database
    Replies: 7
    Last Post: 04-27-2000, 11:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center