0

I have Parent Child kendo ui grids.

The child Grids read looks like this

read: {
        url: baseURL + "/GetOrgSchools/OrgID=" + window.SelectedOrg, 
       // data: { OrgID : window.SelectedOrg }, // pass aditional data
        dataType: "json" // <-- The default was "jsonp"
    },

I am able to filter the child records on the selection of Parent row using this

window.SelectedOrg = orgID;
            $("#gridOrgSchools").data("kendoGrid").dataSource.read({ OrgID: orgID });
            $("#gridOrgSchools").css("display", "block");

But now the child grid has paging Filtering and sorting enabled. so if I click the next page, it is not passing the OrgID and its value, it starts showing all the records.

What do I need to do so that on all the subsequent paging, filtering etc of child grid, i should be able to stick the OrgID in the URL?

OnaBai
  • 40,767
  • 6
  • 96
  • 125
NSS
  • 1,835
  • 2
  • 29
  • 66

2 Answers2

0

Use the data function of the dataSource to constantly send to the server that field need. It will be automatically send with each server request the dataSource does.

Petur Subev
  • 19,983
  • 3
  • 52
  • 68
0

I was able to achieve this using the following in transport of kendou ui

parameterMap: function (options, operation) {


        if (operation == "read")
        {
            if (window.SelectedOrg != null)
                options.OrgID = window.SelectedOrg;
        }
NSS
  • 1,835
  • 2
  • 29
  • 66