Accepted answer

d1.asenumerable.where(function(x1) cint(x1("salary"))>500).copytodatatable


d1.asenumerable.where(function(x1) x1("salary")>500).copytodatatable if the salary column is already an integer

you may need to add assembly reference as if drop down does not appear after you type d1.asenumerable.


filter with linq:

(from row in yourdatatable.asenumerable where cint(row("price").tostring) > 500 select row).copytodatatable

if you found error message:

asenumerable is not a member of ''

please add reference below to your xaml file.




you can also work in a function method approach to linq rather than a sql-like syntax.

dt_data = dt_data.asenumerable.where(
  function(x) cint(x("price")) > 500

you can treat data in the datatable with .select(func) returning you a collection of however you treat the data.

Related Query

More Query from same tag