I have a dataset, that contain list of rows. I want last row from the dataset. Then asign this dataset to datatable.
- DataTable dt = (DataTable)ds.Tables[0].Rows[ds.Tables[0].Rows.Count - 1];
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Manas MohapatraPosted Nov 26, 2016, 2:33 AM
Abhilash J APosted Nov 26, 2016, 1:58 AM
Manas MohapatraPosted Nov 26, 2016, 1:22 AM
DataRow drow = (DataRow)ds.Tables[0].Rows[ds.Tables[0].Rows.Count - 1];
DataTable dt = new DataTable();
dt.Rows.Add(drow);
Rajeesh MenothPosted Nov 26, 2016, 1:08 AM