Click here to Skip to main content
14,696,521 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
i have created this generic plugin for kendo grid which i can use on multiple webpages (mvc). Now there is a web-page which is also using this plugin and which i want to make customised (like making groupable from true to false, selectable property from true to false). But the problem here is that i makes changes to all the web-pages where i have applied this kendo-grid plugin. i wish to make changes only to a particular page. PLEASE help. thanks in advance

// A generic kendo grid which is configurable
(function ($) {
    
    $.fn.GenericGridPlugin = function (configuration, readData, g_searchPageSize) {
        $(this).kendoGrid({
            editable: false,
            pageable: true,
            sortable: true,
            groupable: true,
            autobind:false,
            autoSync: true,
            selectable: true,
            columns: configuration.columns,
            navigatable: true,
            dataSource: {
                serverPaging: true,
                serverSorting: true,
                transport: {
                    read: readData
                },
                pageSize:  g_searchPageSize,
                schema: {
                    data: function (response) {
                        return response.Result;
                    },
                    total: function (response) {
                        return response.TotalRecords;
                    }
                }
            }

        });
    }
}(jQuery));
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900