EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: jaimi on September 13, 2012, 04:11:42 AM



Title: How to pass a parameter to edatagrid
Post by: jaimi on September 13, 2012, 04:11:42 AM
I created a edatagrid via javascript plus a toolbar via markup for the search as like as in the tutorial.

After clicking the search button the values are passed to the php for the reomte query as described.
I would like to pass allready known parameters on first build of the edatagrid without clicking the search button.
How can I do that?


Title: Re: How to pass a parameter to edatagrid
Post by: stworthy on September 13, 2012, 06:51:03 PM
The 'queryParams' property can be used to send parameters to server when calling an ajax request.
Code:
$('#dg').edatagrid({
  queryParams:{
    p1: 'value1',
    p2: 'value2'
  }
});


Title: Re: How to pass a parameter to edatagrid
Post by: jaimi on September 21, 2012, 10:23:30 PM
Thanks