RadDataForm Add Button disabled

5 posts, 0 answers
  1. Sirilak Tanepoon
    Sirilak Tanepoon avatar
    3 posts
    Member since:
    Apr 2010

    Posted 08 Jun 2012 Link to this post

    Dear support,

    When I click "Add", fill-in data and then "OK", the data has successfully put in the collection but "Add" button is still disabled.
    I have to click "Edit" follow by "Cancel" so that the "Add" button become enabled again.
    What's wrong?

    Meaw
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 08 Jun 2012 Link to this post

    Hi,

     I was not able to reproduce such a behaviour at our demos. Please try what the behaviour is with the latest binaries.

    Greetings,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Sirilak Tanepoon
    Sirilak Tanepoon avatar
    3 posts
    Member since:
    Apr 2010

    Posted 16 Jun 2012 Link to this post

    Dear support,

    Now I know what cause the problem.
    The dataform was bound to a ListCollectionView of objects that implement IEditableObject and INotifyPropertyChanged.
    By design, those objects raised OnPropertyChanged event on EndEdit or CancelEdit method because there were some changes in their internal properties. This made the dataform think the object has been changed again so it didn't enable navigation and Add New buttons. 

    My question, can we make the dataform pay attention to only those properties bound to UI element under the dataform, or is there any other solution?

    thanks,
    Meaw
  5. Javid
    Javid avatar
    2 posts
    Member since:
    Oct 2012

    Posted 08 Oct 2012 Link to this post

    Hi Meaw,

    I have a dataform with the same behavior as you described. The add button disables after adding an item. My ItemsSource is bound to a CollectionView of objects that implements IEditable interface.
    I wanted to ask you if or how you solved your problem. Any help will be appreciated.

    Thanks

    Javid,
  6. Tomasz
    Tomasz avatar
    4 posts
    Member since:
    Dec 2012

    Posted 22 May 2013 Link to this post

    Hello,
     for people who can face this problem too: at the moment I have solved this by using MoveCurrentToPosition(((RadDataForm)sender).CurrentIndex); in RadDataFormCommands.CommitEdit handler. But im not sure if this is an optimal solution.

    Regards,
Back to Top
UI for WPF is Visual Studio 2017 Ready