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

ListView issue with detail view

5 Answers 77 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
XiMnet Malaysia
Top achievements
Rank 1
XiMnet Malaysia asked on 03 Dec 2014, 03:18 AM
Hi,

In this URL, I have a Listview with its detail view.
http://telerik.ximnet.com.my/kendo_test/#views/sample_listview.html

When I click an item, it can show the message in the detail view.
However, when I click Cancel and click on another item again, it will shows error as demonstrated here:
http://upload.ximnet.com.my/huisheng/list_view_details.swf

What could be the issue?

Thanks.





5 Answers, 1 is accepted

Sort by
0
Accepted
Petyo
Telerik team
answered on 04 Dec 2014, 05:21 PM
Hello XiMnet,

from what I see, you are calling kendo.bind each time the detail view is displayed (in the show event). This is not supported and most likely causes the error you are facing. Instead, you should assign the detail record to the existing view model object - this will rebind the view. 

A very similar approach is implemented in the sushi application - check the detail view show handler.

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
XiMnet Malaysia
Top achievements
Rank 1
answered on 08 Dec 2014, 09:52 AM
Hi Petyo,

I have updated the fn_show_detail as following: However, I got item is undefined.
Is this the correct way?
Thanks.

var id = parseInt(e.view.params.id),
item = sample_listviewMS.Kendo_DataSource.get(id);
sample_listviewMS.set("currentItem", item);
alert(item);
0
XiMnet Malaysia
Top achievements
Rank 1
answered on 09 Dec 2014, 06:52 AM
Hi Petyo,

Please ignore my question above.
I have solved the issue.

Thanks.
0
jwize
Top achievements
Rank 1
answered on 08 Jan 2015, 06:41 PM
And would you like to share your solution so that others might benefit from the answer?
0
XiMnet Malaysia
Top achievements
Rank 1
answered on 09 Jan 2015, 01:38 AM
You may check my sample listview JS file:
http://telerik.ximnet.com.my/kendo_test/js/sample_listviewMS.js
Tags
ListView (Mobile)
Asked by
XiMnet Malaysia
Top achievements
Rank 1
Answers by
Petyo
Telerik team
XiMnet Malaysia
Top achievements
Rank 1
jwize
Top achievements
Rank 1
Share this question
or