This is a migrated thread and some comments may be shown as answers.

Listview item with kendo.fx

2 Answers 52 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
JT
Top achievements
Rank 1
JT asked on 06 Feb 2013, 05:03 PM
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 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 08 Feb 2013, 08:51 AM
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!
0
JT
Top achievements
Rank 1
answered on 08 Feb 2013, 01:44 PM
Petyo, thanks for your assistance!

Regards,
JT
Tags
ListView (Mobile)
Asked by
JT
Top achievements
Rank 1
Answers by
Petyo
Telerik team
JT
Top achievements
Rank 1
Share this question
or