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


1 Answer 89 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Bibin asked on 12 Dec 2012, 03:27 PM
I have a grid that is populate based on a data source that is changed according to user search criteria. Web page is not refreshed when updating the grid. Here is the problem, Let say that I grouped the grid based on column A after the first search. If I click on the search again with or without changing the search criteria and repopulate the data to the grid, it no longer allow me to group based on any other column except column A ( previous grouping ).

Here is the extract of the code that does the data binding:
                    type: "POST",
                    async: true,
                    timeout: 60000,
                    url: serviceMaterialsUrl,
                    data: paramsData,
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (data) {
                            editable: false,
                            dataSource: { 
                                data: data.d,
                                pageSize: 100
                            sortable: { 
                                mode: "multiple",
                                allowUnsort: true
                            filterable: true,
                            resizable: true,
                            columnMenu: true,
                            pageable: {pageSizes: [100, 200, 300]},
                            detailInit: detailInit,
                            columns: [
                                { field: "select", ..." },
                                { field:..... }
                    error: function (err) {

1 Answer, 1 is accepted

Sort by
Petur Subev
Telerik team
answered on 14 Dec 2012, 03:00 PM
Hello Bibin,

Re-creating the Grid on each search is not a good idea for your case and I do not recommend using it.

I suggest you to initialize your Grid only once when the page is loaded (not each time the success function is called) and just call the appropriate method provided by the dataSource object of the Grid client object each time you perform a search.

There are methods such as group/filter/sort/page or the query method (which could combine several operations within a single server request). All are covered in our documentation.

Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Asked by
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question