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

Add populated item to listview

5 Answers 173 Views
ListView
This is a migrated thread and some comments may be shown as answers.
100%
Top achievements
Rank 1
100% asked on 29 Jan 2014, 12:31 PM
According to

http://docs.telerik.com/kendo-ui/api/web/listview#methods-add

you can read that the method add() is adding an empty item as first item and prepares it for editing.

What I expect from the method name is to be able to add a populated item.
Is the only way of doing that to change the data source?

5 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 29 Jan 2014, 05:33 PM
Hi,

If you want to add a pre-populated item you should work directly with ListView's DataSource API. Please check the insert method which allows you to add an item at a specific position or the add method which will append the item at the end.

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
100%
Top achievements
Rank 1
answered on 31 Jan 2014, 02:54 PM
How do I get the data source for the listview?
0
Accepted
Alexander Valchev
Telerik team
answered on 31 Jan 2014, 03:42 PM
Hi,

You can use $("#listView").data("kendoListView").dataSource where listView is the ID of your widget.
I suggest you to check also this help topic as it explains the widget basics.

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
100%
Top achievements
Rank 1
answered on 31 Jan 2014, 06:33 PM
I keep it since I created it?
0
100%
Top achievements
Rank 1
answered on 31 Jan 2014, 06:34 PM
Ah, now I see your reply!
Tags
ListView
Asked by
100%
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
100%
Top achievements
Rank 1
Share this question
or