Sql query in filter collection
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
23-07-20 04:49 PM
Hi all,
Is it possible to enter a SQL query into filter input of filter collection.
Like - select col1,col2 from collection-name
Is it possible to enter a SQL query into filter input of filter collection.
Like - select col1,col2 from collection-name
------------------------------
sapna soni
.
Capgemini Pvt Ltd
Asia/Kolkata
------------------------------
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-07-20 03:03 AM
@sapna soni - I believe you can use .net LINQ on it. Collection is .net datatable. Apply filter on it with LINQ and get new datatable as output -
ex -
DataTable selectedTable = tb.AsEnumerable()
.Where(r => r.Field<string>("Modul") == value)
.CopyToDataTable();
------------------------------
Mayank Goyal
------------------------------
ex -
DataTable selectedTable = tb.AsEnumerable()
.Where(r => r.Field<string>("Modul") == value)
.CopyToDataTable();
------------------------------
Mayank Goyal
------------------------------
