BeforeChange or Selectable=False

4 posts, 0 answers
  1. Patrick
    Patrick  avatar
    10 posts
    Member since:
    Nov 2011

    Posted 20 Dec 2012 Link to this post

    I have a master details setup where all of my items are in a listview that uses a template to show a summary of their details.  Once an item is selected, another template is renderend that shows an editable form for the selected item.  I am not using the Edit functionality of the listview.  I would like to prevent the user from selecting a different item if the currently selected item isDirty. 
    My question is, would it be best to set Selectable=False when the current item has changes and then to True after changes have been saved/cancelled or is there a better way to handle this scenario?  Would changing the Selectable value even work or is this something that can only be set during initialization? 
    Based on similar posts, there seems to be many requests for an event to cancel the Change event of the listView.  I hate to ask, but are there any plans to implement this functionality? 

    I am also experiencing an issue where the uid of the selected listview item seems to change when cancelChanges is called on the underlying datasource.  Is this expected behavior?

    thanks,
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 24 Dec 2012 Link to this post

    Hello Patrick,

     Currently you cannot disable or enable selection programmatically. Selection is enabled only during initialization time. 

     I created a demo showing how to disable selection conditionally: http://jsbin.com/udayuq/1/edit

    Regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Patrick
    Patrick  avatar
    10 posts
    Member since:
    Nov 2011

    Posted 24 Dec 2012 Link to this post

    Thanks.  Your demo works great in FireFox, but does not work in IE9.  Can you make the changes so it work in both browsers?
    Are there any plans to enable us to change the Selectable property programmatically?

    Thanks again.
  5. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 26 Dec 2012 Link to this post

    Hello,

     This example fails in IE9 only in edit mode due to some jsBin quirk. Viewing it without the editing mode works as expected: http://jsbin.com/udayuq/1 The code should work as expected in your project.

    We don't have such plans because this is the first time this has been requested. I suggest opening a new feature request in our feedback portal.

    Regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready