Add populated item to listview

6 posts, 1 answers
  1. 100%
    100% avatar
    75 posts
    Member since:
    Apr 2013

    Posted 29 Jan 2014 Link to this post

    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?
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 29 Jan 2014 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. 100%
    100% avatar
    75 posts
    Member since:
    Apr 2013

    Posted 31 Jan 2014 in reply to Alexander Valchev Link to this post

    How do I get the data source for the listview?
  5. Answer
    Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 31 Jan 2014 Link to this post

    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!
  6. 100%
    100% avatar
    75 posts
    Member since:
    Apr 2013

    Posted 31 Jan 2014 Link to this post

    I keep it since I created it?
  7. 100%
    100% avatar
    75 posts
    Member since:
    Apr 2013

    Posted 31 Jan 2014 Link to this post

    Ah, now I see your reply!
Back to Top
Kendo UI is VS 2017 Ready