Listview item with kendo.fx

3 posts, 0 answers
  1. JT
    JT avatar
    4 posts
    Member since:
    Jun 2012

    Posted 06 Feb 2013 Link to this post

    I have a listview where each item has a 2 divs, one with info and a second with a form, the form is hidden but when I tap the item it uses kendo.fx.expand to slide the drawer down and display the form, this part works perfectly, but when I change the input and move focus it resets the display:none on the parent div and hides it. I have no events set on the input to trigger this. And all my debug ideas so far have yielded no results.

    Just a regular onblur does nothing (the div stays as it should), the problem only appears on change + blur. I've tried overriding the onchange and onblur events thru direct declaration in the input using "return false;" and using data-bind="events: {blur: ..., change: ...}" .

    I also tried using jquery.slideToggle and get the same result.

    Attached is a sample project that demonstrates the problem.

    Any ideas on what I am doing wrong or could change?
  2. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 08 Feb 2013 Link to this post

    Hello JT,

    The problem you experience is due to the fact that changing the input value causes a change in the MVVM binding value - which triggers redraw of the listview item (reseting it back to the initial state where the div is collapsed). 

    The correct way to do that would be to store a flag about the form visible state in the MVVM item too - please see this jsbin for details.

    Greetings,

    Petyo
    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. JT
    JT avatar
    4 posts
    Member since:
    Jun 2012

    Posted 08 Feb 2013 Link to this post

    Petyo, thanks for your assistance!

    Regards,
    JT
Back to Top