Click here to Skip to main content
14,663,530 members
Rate this:
Please Sign up or sign in to vote.
I have got two kendo grid in a page called region and Search band. Where the region grid has the list of all the region names listed and the search band has the region names listed in a drop down along with few other fields.

When ever we add a new region in the region grid the region name should display in the drop down list under the search band. But this happens only if we refresh the page after we add a new region. But I do not want to refresh only the search band grid to refresh automatically each time we add a region so that the newly added region name is displayed in the drop down without refreshing the whole page.

We have got a refresh button at the end of each grid. The newly added region name does not display in the drop down even if I manually refresh the search band grid by clicking on the button. It works as expected to display the newly added region name to display in the search band drop down only if I refresh the whole page(which we don't want).

The jquery used till to refresh the search band grid is

function grid_onSave(data) {
       data.preventDefault();
       var validator = $('#RegionList').kendoValidator().data('kendoValidator');
       if (validator.validate()) {
           var dataItem = {
               RegionId: data.model.RegionId,
               Name: data.model.Name
           };
           if (dataItem.RegionId == "") {
               addRegion(dataItem);
           }
           else {
               editRegion(dataItem);
           }
       }
       //window.location.reload();
       $('#SearchBandList').data('kendoGrid').dataSource.read();
       $('#SearchBandList').data('kendoGrid').refresh();
    }


Can anyone help on how to fix this issue.

What I have tried:

I tried using the above jquery which doesn't seems to work.
Posted

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

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100