Fixed multiple query conditions for Jqgrid Setgridparam PostData Cumulative

Source: Internet
Author: User
Tags jqgrid

Depending on the number of parameters queried by the elements, the different number of query parameters is passed start

var elements = Node.attributes.text.split (",");

var postdata = [];
if (elements.length = = 1) {

When there is only one parameter
PostData = {txt_industry_: elements[0]};
} else if (elements.length = = 2) {

When there are two parameters,
PostData = {txt_industry_: elements[0], Txt_modulecode_: elements[1]};
}

Depending on the number of parameters queried by elements, the different number of query parameter end is passed

Query except for the original pass parameters, and empty the start individually
var postData1 = $ ("#jq"). Jqgrid ("Getgridparam", "postdata");
Delete postdata1["Txt_industry_"];
Delete postdata1["Txt_modulecode_"];

Query except for the original pass parameters, and empty the end individually

Pass a new query parameter and refresh the table

$ ("#jq"). Jqgrid ("Setgridparam", {postdata:postdata}). Trigger ("Reloadgrid");

Fixed multiple query conditions for Jqgrid Setgridparam PostData Cumulative

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.