for example if I input 49, it would return 2 ,because it is in the second line
you can write select query and get index of that row by passing Value of particular column.
Use the below query
int rownumber = yourDatatable.Rows.IndexOf((from x as datarow in yourDatatable where x(column index/coumn name).ToString.Equals(“your search value”) select x).First) +1
Replace the values in bold with your data. And your search value must be unique or else the query will return row number of the first occurrence.
Thank you very much
but I use the “for each row” dt.rows.Indexof(row) to get the row number