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

MMVM and Grid: define grouping declaratively

0 Answers 50 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 28 Sep 2012, 03:44 PM
This is probably simple, but I've not found a solution. I've a ground declared like so:

    <div id="grid" 
         data-role="grid" 
         data-bind="source: tasks" 
         data-columns='[{ "field": "taskId", "width": "150px", "title": "Id" }, ... ]' 
         data-pageable='{ "pageSize": 10 }'
         data-groupable='[{ "field" : "completionStatusDescription", "aggregates": [{"field": "taskId", "aggregate": "count"}] }]'
        >
    </div>

This is bound to a view model and all works fine except for the grouping. Is the above the correct format? I couldn't find explicit docs on this and just guessed, which is probably why it isn't working. The grouping works in the UI, although I can't configure the aggregates.

Is this possible, or have I just got the synax wrong?

Thanks

d

No answers yet. Maybe you can help?

Tags
MVVM
Asked by
Dave
Top achievements
Rank 1
Share this question
or