How to filter a DataTable and get only the Last entered Row

Hello guys,

I have to extract a table and add only the last entered row(in this case it is the row 2) to the Queue. I am attaching the image below, I have to extract the below table and filter it and Add the last entered row to the Queue. Any idea how can I do that?

Hey,

you will get the last row

YourDatatableVar.Rows(YourDatatableVar.Rows.Count-1)

Thanks

Hey Thank you for replying. this will output a datarow? If i assign the above code to a variable of type DataRow, how can i output it as a string?

Hey,

You can put this, you will get the value

OutDT.Rows.Item(OutDT.Rows.Count-1)(0)

where 0 is the Index of column you can give 1,2,3,4…so on

Thanks

1 Like

Thank you so much

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.