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

After ajax call Groupby is not working

1 Answer 84 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rahul Masurekar
Top achievements
Rank 1
Rahul Masurekar asked on 27 Aug 2013, 02:23 PM
While Changing the view, fresh data is loaded in grid based on view selection [ Making the ajax call for retrieving the grid data].
Groupby is stop working once fresh data is loaded. [ Not able to drag the column ]

     
function GridBind(urlGetData) {
    $.ajax({
        url: urlGetData,
        dataType: 'json',
        success: function (results) {
               _grid = $("#grid").kendoGrid({
                dataSource: {
                    data: results.Rows  ,
                    pageSize: parseInt($('#DefaultPage').val())
                },
                groupable: true,
                scrollable: true,
                sortable: true,
                filterable: { extra: false },
                pageable: {
                    refresh: true,
                    pageSizes: [10, 20, 30, 40, 50, 100]
                },
                detailTemplate: kendo.template($("#template12").html()),
                detailInit: detailInitDB,
                cache: false,
                resizable: true,
                dataBound: function () {
                    resizeGrid();
                },
                selectable: "multiple",
                change: function () {
                    onSelection();
                },                columns: results.Cols
                });     
                resizeGrid();
            }
        }    });              

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 29 Aug 2013, 08:07 AM
Hello Rahul,

The behavior that you are observing is due to the fact that multiple instances of the Grid widgets is created over same element /every time the request completed/. 

You must destroy previous Grid instance before create a new one.

Regards,
Nikolay Rusev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Rahul Masurekar
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or