This is a migrated thread and some comments may be shown as answers.

[Solved] ITypedList for ASP.NET Grid MVC

5 Answers 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Oscar
Top achievements
Rank 1
Oscar asked on 28 Jul 2011, 02:08 PM
Hi,
I have a collection that implements ITypeList. When I bind this collection to a telerik.grid, it doesn't show any column. Is telerik grid ready for ITypedList interface? Would you provide any sample, please?

5 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 29 Jul 2011, 07:45 AM
Hello Oscar,

Just tried with sample ITypedList implementation from following MSDN article and it seems to be working.
For your convenience I am attaching sample application.

Greetings,
Nikolay
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

0
Oscar
Top achievements
Rank 1
answered on 31 Jul 2011, 10:36 PM
Thank you, Nikolay.
I've tried your solution, but the GetItemProperties() function is never called. My requirement is that I need to add properties to Customer class at runtime(It must implement ICustomTypeDescriptor). Then, ITypedList of the SortableBindingList should provide the list of dynamic properties of the customer class to the grid.
In your sample, the properties of the Customer class are known at compile time. Would you please try to add properties to your customer class and test if the grid creates all the columns -static and dynamic ones-?
0
Nikolay Rusev
Telerik team
answered on 01 Aug 2011, 08:32 AM
Hello Oscar,

I am afraid that binding to ICustomTypeDescriptor is not supported in current implementation of MVC Grid.

Regards,
Nikolay
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

0
Oscar
Top achievements
Rank 1
answered on 01 Aug 2011, 09:46 AM
Hi Nikolay,
Do you have a schedule for this? My application is based on this requirement. How can I edit collections of business classes where their properties are known at runtime? 
0
Nikolay Rusev
Telerik team
answered on 02 Aug 2011, 07:30 AM
Hello Oscar,

Unfortunately supporting binding to ICustomTypeDescriptor is not a trivial task and we already have our plans for next quarter.

You could perhaps use binding to dynamic objects or ADO.NET DataTable instead.

Greetings,
Nikolay
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Tags
Grid
Asked by
Oscar
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Oscar
Top achievements
Rank 1
Share this question
or