hi guys ,how should i add a record at end of datatable and see it at datagridview

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abol yad
    New Member
    • Jan 2010
    • 1

    hi guys ,how should i add a record at end of datatable and see it at datagridview

    when i first load my data from xml file ,i can see all of it in datagridview,bu t when i try to add or insert a record at end ,datagridview only show the added record,not all of them all toghether
    this doesnt work ,i saw it on internet

    myRow = myDataTable.New Row();
    myRow.Columns["Col1"].Value = "Abc";
    myRow.Columns["Col2"].Value = "Xyz";
    myDataTable.Row s.Add(myRow);

    //it ask for tablename,datas et ,everything all over again
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Try setting the datasource of your datagridview to that datatable

    Comment

    Working...