Empty List Template

2 posts, 0 answers
  1. jen
    jen avatar
    63 posts
    Member since:
    Jun 2009

    Posted 17 Jun 2013 Link to this post

    Is there any way to display a blank form/empty template when there are no items in the collection?

    Currently the form displays the Read Only template, but no converters in that template will run if the current item is null.

    My issue is I have a button in my Read Only template that I need to disable when the current item is null. I tried a data converter but it wont run. Ideally I'd prefer to not have any feilds shown when the current item is null.

    Any suggestions?
  2. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 20 Jun 2013 Link to this post

    Hello,

    Basically the main difference between the auto-generated fields and the customized DataTemplates is that auto-generated fields are generated every time when the CurrentItem changes. On the other hand the DataTemplates get switched between readonly/edit/add, but there is always one "active" template, which is bound to the current item. If you want to hide them, you can set the ReadOnlyTemplate to null, when current item is null. Alternatively you can try binding this button's IsEnabled property to RadDataForm's CurrentItem.

    Regards,
    Ivan Ivanov
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top