Select query with where condition for local build data table

Hello folks,
I have local datatable contains two columns CODE , VALUE
i want to write a select query with where condition

ex: dt.select “value” where code = +var+
can any one please help me out with proper syntax thanks in advance

@venkateshgorantla Try below command

dt.Select(“[CODE]='”+var+“'”)(0)(1).ToString

Or

dt.Select(“[CODE]='”+var+“'”).CopyToDataTable(0)(1).ToString

2 Likes

thank you @Manjuts90 its working fine…

1 Like

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