ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: fmusignac on April 06, 2018, 06:12:38 pm

Title: Refresh Row after Changing Data Model
Post by: fmusignac on April 06, 2018, 06:12:38 pm
I am having an issue using the refreshRow method after changing the pq_hidden property for a row. I am getting the error "Uncaught too many iterations" regardless of how I am using the refresh method whether in a loop looking for every qualifying row or with just one row by specifying the index (commented out below). I am trying not to use the refreshDataAndView method since I have checkbox controls in the grid that loose the clicked state when I refresh the whole thing. Please advise. Thanks!

    var detailsGrid = $('div#BudgetDetails').pqGrid()
    var data = detailsGrid.pqGrid("option", "dataModel").data;

    for (var i = 0, len = data.length; i < len; i++) {
        if (data[0].indexOf('rateCell') != -1) {
            data.pq_hidden = !visible;
            $("div#BudgetDetails").pqGrid("refreshRow", { rowIndx: i });
        }
    }
    //detailsGrid.pqGrid("refreshDataAndView");
    //pq.grid("div#BudgetDetails").refreshRow({ rowIndx: 4 });
Title: Re: Refresh Row after Changing Data Model
Post by: paramvir on April 06, 2018, 06:34:43 pm
There is no need to use refreshDataAndView, understandably it also refreshes the data which is not desired.

refresh or refreshView would be sufficient.