Asp. The complete example and summary of using Jqgrid in net __.net

Source: Internet
Author: User
Tags jqgrid

Recently in the use of Jqgrid plug-ins, more configuration items,

Here to put a complete example that someone else has already written, click to open the link, the friend who needs to jump to view, http://www.cnblogs.com/miro/p/jqGrid.html

After that, I will summarize some practical problems that I have encountered.

The actual problem encountered:

1. When the page is not required to display, the subsequent data dynamic loading, set the property

Scrollpopup:true,
scroll:1,
page:1,
However, after setting up, want to loadcomplete events in the default selected line, has been selected, and still do not know why, because the table data is not large, and finally had to discard the properties set above.

Loadcomplete:function () {
        $ ("#Grid1"). Jqgrid (' SetSelection ', 1, true);
        $ ("#Page1_center"). Remove (); }
2. After adding or deleting the operation submitted, let the pop-up box disappear, just set:

Reloadaftersubmit:true,
Closeafteradd:true,
3.jqGrid rebind data, refresh table

$ ("#search"). On ("click", Function () {
                $ ("#Grid1"). Jqgrid (' Setgridparam ', {
                    datatype: ' JSON ',
                    postdata: Data,
                }). Trigger ("Reloadgrid"); Reload

            })
4. Sub-IFrame Gets the elements of the upper document

JS notation:

Window.parent.document.getElementById ("Myele");
JQ to be concise:

$ ("#myEle", window.parent.document)
or








Related Article

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.