I want all Index value from data table using condition.
I have tried like below but not getting expected results
foreach (DataRow rows in dtResult.Select("IsOut = 'True'")) { int index = rows.Index; }
Hi @mnadil187
You can do it like this
foreach (DataRow rw in dt.Rows) { int index = dt.Rows.IndexOf(rw); }
I found the solutions.
I did like below to get index no and perform some operation
foreach (DataRow rows2 in dtResult.Select("IsOut = 'True'")) { int OutIndex = dtResult.Rows.IndexOf(rows2); }
Thank You Sir
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.