DataBinding and Filtering
-
Hi Guys, I have a LINQ problem with binding to DataGrids. Filter does not work with IQueryable , so i'm going to have to do this with a DataTable, to handle sorting / filtering of data. However, somewhere along the road, IQueryable appears to have lost the ToDataTable() method. What are my available options now? Cheers Tris
------------------------------- Carrier Bags - 21st Century Tumbleweed.
-
Hi Guys, I have a LINQ problem with binding to DataGrids. Filter does not work with IQueryable , so i'm going to have to do this with a DataTable, to handle sorting / filtering of data. However, somewhere along the road, IQueryable appears to have lost the ToDataTable() method. What are my available options now? Cheers Tris
------------------------------- Carrier Bags - 21st Century Tumbleweed.
-
Cheers. I had read it but didn't find what i want, at second glance, it appears to be right on the money. Why did they remove the two pieces of functionality that are required to easily get filtering to work? *Grumble Rant Growl*
------------------------------- Carrier Bags - 21st Century Tumbleweed.
-
Cheers. I had read it but didn't find what i want, at second glance, it appears to be right on the money. Why did they remove the two pieces of functionality that are required to easily get filtering to work? *Grumble Rant Growl*
------------------------------- Carrier Bags - 21st Century Tumbleweed.
Tristan Rhodes wrote:
Why did they remove the two pieces of functionality that are required to easily get filtering to work?
Well, Linq is supposed to be easy to filter by itself. You can get the data and then filter using Linq to Objects, or you can filter the data from the database.
Deja View - the feeling that you've seen this post before.
-
Tristan Rhodes wrote:
Why did they remove the two pieces of functionality that are required to easily get filtering to work?
Well, Linq is supposed to be easy to filter by itself. You can get the data and then filter using Linq to Objects, or you can filter the data from the database.
Deja View - the feeling that you've seen this post before.
The condition generation is quite complicated and it is easier to apply it with a filter string generated by concatenation, than handle each individual condition in separate LINQ queries. Normally i would go with Linq Objects. Thanks for the article, i've got it working as a datagrid... good bye neat code, hello WTF. :( Tris
------------------------------- Carrier Bags - 21st Century Tumbleweed.
-
The condition generation is quite complicated and it is easier to apply it with a filter string generated by concatenation, than handle each individual condition in separate LINQ queries. Normally i would go with Linq Objects. Thanks for the article, i've got it working as a datagrid... good bye neat code, hello WTF. :( Tris
------------------------------- Carrier Bags - 21st Century Tumbleweed.
Tristan Rhodes wrote:
Thanks for the article, i've got it working as a datagrid... good bye neat code, hello WTF.
OK - should I be insulted? ;)
Deja View - the feeling that you've seen this post before.
-
Tristan Rhodes wrote:
Thanks for the article, i've got it working as a datagrid... good bye neat code, hello WTF.
OK - should I be insulted? ;)
Deja View - the feeling that you've seen this post before.
Heh, nope. I just hate DataTables. Had to re-write all my logic with (string)row["field"] == blahblah etc.
------------------------------- Carrier Bags - 21st Century Tumbleweed.