ParamQuery grid support forum
General Category => Help for ParamQuery Select => Topic started by: rsgmedia on October 23, 2016, 09:37:42 am
-
We are using PqSelect multiselect with checkboxes. I am able to get the selected values as an array if id's. I want to select items of pqselect using an array of id's I am getting from my DB. How can I do that?
Code Snippet:
//To Get
var agencies = $('#ddlAgencies').val();
//output [12,23];
//To Set
var agencies = [12,23,34];
$('#ddlAgencies').val(agencies);
When I Set pqSelect using above statement it doesn't give me any error but do not select the desired values
-
refreshData() needs to be called after that.
$('#ddlAgencies').pqSelect( "refreshData" );
http://paramquery.com/pro/api/select#method-refreshData
-
Thanks it worked well!!