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

Using different objects as Itemsource

2 Answers 42 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 19 Jul 2011, 01:33 PM
Hi,

Is it possible to have different object in a DataForm and display autogenerate its properties ?

Sample :

List<Object> o = new List<Object>();
            o.Add(new CustomObject1());
            o.Add(new CustomObject1());
 
ARForm.ItemsSource = o;

I would like to avoid to create an Edition UserControl for each CustomObject because ther are all related.

Regards,
S

2 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 19 Jul 2011, 01:47 PM
Hi Steven,

The current version of RadDataForm does not support binding to a collection of heterogenous objects.

The workaround I may suggest is to use external navigation for your collection and use the CurrentItem property to feed the RadDataForm , rather than the ItemsSource property.

Regards,
Pavel Pavlov
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Steven
Top achievements
Rank 1
answered on 19 Jul 2011, 02:04 PM
Thank you Pavel,

Regards,
Steven
Tags
DataForm
Asked by
Steven
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Steven
Top achievements
Rank 1
Share this question
or