Server Side Grouping

1 Answer 104 Views
Data Query Grid
Ali
Top achievements
Rank 1
Ali asked on 11 May 2023, 08:39 PM

hi, 

i am working on server side pagination and grouping, i am using the example below in giver url,

https://www.telerik.com/kendo-react-ui/components/dataquery/mvc-integration/

when i implement this example in my code its working fine with pagination, filtering and sorting, but when i am try to group data

my UI showing nothing. can you please give an example with server side grouping and pagination?

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 15 May 2023, 05:18 PM

Hello Ali,

For enabling the grouping you will have to set the "grouping" property to "true", but also set the "group" property of the Grid to the current group expression:

In the context of the example with the MVC integration, you will have to add the following:

                <WrappedGrid
                    filterable={true}
                    sortable={true}
                    pageable={{ pageSizes: true }}
                    {...this.props}
                    total={this.state.total}
                    data={this.state.data}
                    groupable={true}
                    group={this.state.dataState.group}
                    skip={this.state.dataState.skip}
                    pageSize={this.state.dataState.take}
                    filter={this.state.dataState.filter}
                    sort={this.state.dataState.sort}
                    onDataStateChange={this.handleDataStateChange}
                />

Another option is to configure the Grid to use the DataState directly (instead of setting the skip, pageSize, filter, sort, group explicitely). The following example demonstrates how to integrate the DataState in the Grid (the same is applicable for the server-binding as well):

Hope this helps.

 

Regards,
Konstantin Dikov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!

Tags
Data Query Grid
Asked by
Ali
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or