Hi,
Please help me to know how can I select n row from data table which does not have any id column for selecting?
I want select rows by loop as the same below:
1
2
3
---
4
5
6
---
...
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.
Dhanunjay JajimogglaPosted Jun 18, 2014, 12:37 AM
see below code,
for (int i = 0; i < datatable.Rows.Count; i++)
{
string Value1 = datatable.Rows[n]["FieldName"].ToString();
-------------
-------------
}
Now you will get the nth row from your datatable