Match DataTable column value using variable

Hi,

I have a data table “AllJobsDT” and I’m running the following code in For Each. Would like to ask how can I set the column name “JobNo” as a variable? Or please advise if there are any other recommened ways to match data table values. Thanks!

row(“JobNo”).ToString = SelectedJobID

Hi @emily u can use datatable.Columns(0).ColumnName to get column name at 1st position.

1 Like