Hi MMP,
I have written code that gets the row of specified Id.
C#
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[3] { new DataColumn("Id", typeof(int)),
new DataColumn("Name", typeof(string)),
new DataColumn("Country",typeof(string)) });
dt.Rows.Add(1, "John Hammond", "United States");
dt.Rows.Add(2, "Mudassar Khan", "India");
dt.Rows.Add(3, "Suzanne Mathews", "France");
dt.Rows.Add(4, "Robert Schidner", "Russia");
int id = 2;
DataRow[] dr = dt.Select("Id=" + id);
I am able to get row of specified Id in DataRow.
You must check wether your DataTable contains column with ID or not.
I hope this will help you out.