Can anybody help me how to get a specific row from the Data Table. For example in my Data Table I have 10 rows and 3 columns. I need to access only the 5th row item (all 3 values from the columns). What code should I use for this?
Hi Atrimal, I tried your code, but .value is not supporting. what should I provide in (field1). Is it column index? I want to get all column values for that particular row. Is it possible?
Try the below code
Change the number accordingly to get the record you need
DT = datatable.AsEnumerable().Take(5).Skip(4).CopyToDataTable
Thank You Samir. It is working. That’s exactly what I wanted.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.