About System.Linq.Dynamic and the grid

Apr 11 at 11:47 PM
I am trying for feed the grid from a dynamic linq query and therefore there is no specific entity class to declare as template for the Model.
After several attempts (all failed so far) I couldn't present the grid properly on page.
Any suggestions about how to handle situacions like this? Basically the collection I filled with anonymous objects.
Thanks in advance
Coordinator
Apr 16 at 3:17 AM
Hi,

What the reason to use anonymous objects?

You can't use collection of anonymous objects in the grid, because you need to specify generic collection type.
Apr 16 at 11:07 AM
First of all. Thanks for your answer.

I need to have an option to hide/show selected columns from the user through a checkbox list.
This list is built upon a subset of all the columns available in the model. (For example the primary key internal id would not be available)
So.. after a user's selection I must execute a linq query based only on the marked columns... The only way ( I think ) is to use dynamic link to achieve this goal
by using a select syntax like this:
list.Select("Field1,Field2"); So... every object in the enumerator do not belong to an specific class.

I hope to make myself clear.

Thanks again for your support