Building a MVVM mobile app using Icenium, I have two separate listviews.
I'd like to accomplish the following with only declarative code (data-...)
- 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 ?
- 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 ?
Gilles
5 Answers, 1 is accepted
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.
Petyo
the Telerik team
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
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,
the Telerik team
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
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