Using different objects as Itemsource

3 posts, 0 answers
  1. Steven
    Steven avatar
    35 posts
    Member since:
    Apr 2011

    Posted 19 Jul 2011 Link to this post

    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. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 19 Jul 2011 Link to this post

    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!

  3. DevCraft banner
  4. Steven
    Steven avatar
    35 posts
    Member since:
    Apr 2011

    Posted 19 Jul 2011 Link to this post

    Thank you Pavel,

    Regards,
    Steven
Back to Top