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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Dhanunjay Jajimoggla100 reputationPosted Jun 17, 2014, 8:37 PM EDT
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