ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: sam.shah on March 16, 2018, 10:28:07 am

Title: How to refresh data in grid
Post by: sam.shah on March 16, 2018, 10:28:07 am
I tried to call  grid = $("#grid_editing").pqGrid('refreshDataAndView');
which make ajax call,but with old data of parameter.
Let me explain in brief:- I have 4-dropdownlist to filter data.
After loading grid first time,I have one search button where I am calling grid = $("#grid_editing").pqGrid('refreshDataAndView');.
It's not getting latest values of parameter.
Please help me.

 $("#btnGo").click(function () {
               
                if (validateScenario() == true) {
                    StartWeek = $('#txtDate').datepick('getDate');
                    StartWeek = convert(StartWeek);
                    Site = $('#ddlSite').val();
                    console.log(Site);
                    TimePeriod = $('#ddlTimePeriod').val();
                    ScenarioName = $('#txtScenarioName').val();
                    ScenarioDesc = $('#txtScenarioDesc').val();
                    Sid = $('#Sid').val();
                    grid = $("#grid_editing").pqGrid('refreshDataAndView');
              }
Title: Re: How to refresh data in grid
Post by: paramvir on March 16, 2018, 05:19:44 pm
I understand from your code that you pass parameters to remote script through postData.

You need to update value of postData with new parameters.