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

ListView Declarative configuration

5 Answers 96 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Gilles
Top achievements
Rank 1
Gilles asked on 25 Apr 2013, 01:13 PM
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

5 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 29 Apr 2013, 07:05 AM
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!
0
Gilles
Top achievements
Rank 1
answered on 06 May 2013, 03:32 PM
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
0
Petyo
Telerik team
answered on 08 May 2013, 07:24 AM
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!
0
Gilles
Top achievements
Rank 1
answered on 08 May 2013, 12:34 PM
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
0
Petyo
Telerik team
answered on 10 May 2013, 05:29 AM
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!
Tags
ListView (Mobile)
Asked by
Gilles
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Gilles
Top achievements
Rank 1
Share this question
or