ListView Declarative configuration

6 posts, 0 answers
  1. Gilles
    Gilles avatar
    5 posts
    Member since:
    Mar 2013

    Posted 25 Apr 2013 Link to this post

    Hi,

    Building a MVVM mobile app using Icenium, I have two separate listviews.

    I'd like to accomplish the following with only declarative code (data-...)
    1. for one of the listviews, I need to have the "data-filterable" option enabled, this is fine. What do I need to do next ? How can I specify the field to filter on ? In the doc I've seen "filterable.field", how can I transform that into declarative code ?
    2. the second listview is bound to an array of objects. I'd like to group the listview based on one property of the source objects. How can I achiev that with declarative code ?
    Thanks for your help,

    Gilles
  2. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 29 Apr 2013 Link to this post

    Hello Giles,

    The data attributes accept json formatted configuration options. You can refer to the following documentation article for more details and samples.

    The listview is grouped automatically when bound to a grouped datasource. Please see this demo.

    All the best,
    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. Gilles
    Gilles avatar
    5 posts
    Member since:
    Mar 2013

    Posted 06 May 2013 Link to this post

    Dear Petyo,

    Thanks for your answer and sorry for my late feedback.

    Concerning the grouped datasource in my view-model, what I'm doing instead of using  kendo.data.DataSource, is calling a function that gets the data through the $.ajax method.

    In that case does the automatic grouping also work ?
    If yes, could you provide an example.

    Best Regards,

    Gilles
  5. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 08 May 2013 Link to this post

    Hi Giles,

    Automatic grouping for custom data structures is not supported. The recommended approach would be to replace your $.ajax data fetch with a datasource instance (which, by the way, uses jQuery ajax call under the hood, too).

    All the best,

    Petyo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Gilles
    Gilles avatar
    5 posts
    Member since:
    Mar 2013

    Posted 08 May 2013 Link to this post

    Hello Petyo,

    Thanks for your response.

    While experiencing with the DataSource I noticed a weird behaviour in the listview (which I guess is a bug...) when you activate "pull to refresh" and automatic grouping with fixed headers.
    After a refresh the fixed header doesn't update correctly. Did you experienced similar behaviour ?

    Best Regards,

    Gilles
  7. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 10 May 2013 Link to this post

    Hi Giles,

    Such problem is likely to occur. In general, the listview pull to refresh and endless scrolling features are not compatible in grouped mode (due to the complexity of appending to groups compared to the flat mode). This is something we are looking into improving for our future releases. 

    Regards,
    Petyo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready