EasyUI Forum
May 11, 2024, 04:37:08 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Set URL without reloading grid  (Read 13117 times)
pacific202
Newbie
*
Posts: 35


View Profile
« 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?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: December 06, 2011, 02:26:26 AM »

Call 'load' method and pass new parameter to it:
$("#" + datagrid).datagrid('load',{
  type:'...',
  parameters:...
});
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!