Guest User

Untitled

a guest
Jan 18th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. DataSet ds = new DataSet();
  2. ds.ReadXml(@"D:xmlfile.xml");
  3. dataGridView1.DataSource = ds.Tables[0].DefaultView;
  4. dataGridView1.Tag = ds; /* TAG */
  5.  
  6. string strTitle;
  7. string[] row = new string[] { strTitle, DateTime.Now.ToString("M/d/y"), "checked" };
  8. _parent.dataGridView1.Tag.Tables[0].Rows.Add(row);
  9. _parent.dataGridView1.Rows.Add();
  10. _parent.dataGridView1.DataSource = _parent.dataGridView1.Tag.Tables[0].DefaultView;
  11.  
  12. ds.Tables[0].Rows.Add(row)
  13.  
  14. string strTitle;
  15. string[] row = new string[] { strTitle, DateTime.Now.ToString("M/d/y"), "checked" };
  16. DataSet ds = (DataSet)_parent.dataGridView1.Tag;
  17. ds.Tables[0].Rows.Add(row);
  18.  
  19. dataGridView1.DataSource = ds.Tables[0];
  20.  
  21. var dataTable = dataGridView1.DataSource as DataTable;
  22. dataTable.Rows.Add(strTitle, DateTime.Now.ToString("M/d/y"), "checked");
Add Comment
Please, Sign In to add comment