EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: pacific202 on December 05, 2011, 04:55:17 PM



Title: Set URL without reloading grid
Post by: pacific202 on December 05, 2011, 04:55:17 PM
I have a dropdown that controls the "filter" on a datagrid.  The value of the select object is passed into the URL, and then the datagrid is reloaded with the new parameter:


Code:
    parameters = {
        country: activecountry["Name"]
    };
   
    var url = repository + "?type=repository&action=AMT.GetAllocationSummary&parameters=" + $.toJSON(parameters);
   
    // call init function on datagrid
    $("#" + datagrid).datagrid({
        "url": url
    });

Is there a simpler way to operate on the grid with a new URL and the load method instead of completely recreating it?


Title: Re: Set URL without reloading grid
Post by: stworthy on December 06, 2011, 02:26:26 AM
Call 'load' method and pass new parameter to it:
$("#" + datagrid).datagrid('load',{
  type:'...',
  parameters:...
});