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

How to make parameterMap to get executed

1 Answer 671 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Niloofar
Top achievements
Rank 1
Niloofar asked on 22 Mar 2016, 09:44 PM

parametermap never get executed In my grid. I was wondering ifim doing something wrong here.

var dataSource = {

                transport: {
                    read: function (options) {
                        var success = function (response) {
                            options.success(response);
                        };
                        _this.get('PopulateGridData')(success, options.data);
                    },

                    parameterMap: function (data, type) {
                        if (type === "read") {
                            return kendo.stringify(data);
                        }
                    },
                },
                pageSize: gridPageSize,
                schema: gridSchema,
                serverPaging: true,
                serverSorting: true,
                serverGrouping: true,
                serverFiltering: true,
            };

            var gridOptions = {
                dataSource: dataSource,
                columns: gridColumns,
                editable: gridEditable,
                pageable: {
                    refresh: true, //if set to true, it will show refresh button,clicking on that will make the grid to refresh                  
                    numeric: false,
                    previousNext: false,
                    messages: {
                        display: "Loaded {0}-{1} from {2} data items"
                    },
                },
                height: gridHeight,
                scrollable: {
                    virtual: true,
                },
                groupable: true,
                filterable: true,
                sortable: {
                    mode: "multiple"
                },

            };

          var grid = Ember.$("#kendo-grid").kendoGrid(gridOptions).data('kendoGrid');

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 24 Mar 2016, 09:34 AM

Hello Niloofar,

 

This behavior is expected in your setup. As bolded in the parameterMap documentation:

 

`

The parameterMap function will not be called when using custom functions for the read, update, create and destroy operations.

`

 

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
Niloofar
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or