Jquery+ashx No refresh GridView Data Display plug-in (implementing paging, sorting, filtering) _jquery

Source: Internet
Author: User
Reason: jquery is simple, compatibility is good and easy to encapsulate. Do not say much nonsense, immediately start our jquery plugin write it. There should be a lot of people who have written similar plug-ins, and I also have some form of imitating FlexGrid.

Requirements: GridView display data, no refresh paging, no refresh sort, no refresh filter (search data), based on ASP.net (we have ashx general processing file to achieve).

Use to technology: asp.net2.0, JQUERY,CSS

The first is the jquery plug-in aspect, the use of the core function or jquery Ajax functions, convenient and quick.
Copy Code code as follows:

$.ajax ({
Type:p.method,
Url:p.url,
Data:param,
Success:function (msg) {
$. AddData (MSG,SHOWBOX,P);
},
Error:function (msg) {$. Errorajax (showbox,p.errormsg);},
Beforesend:function () {$. Addloading (Showbox);},
Complete:function () {$. Moveloading (Showbox);}
});

Look at this simple sentence, jquery is more fun. The specific code please download the following attachment view Oh.

First hair Zhang into the results of the picture to see (style is not very good-looking, need to weigh the change it)

Sorting and filtering functions

JQUERY+ASHX paging feature without refresh

In fact, here in addition to jquery as the main framework for the entire plug-in, another important document is ASHX this general processing file. Ashx in my entire Jquerygrid plug-in output {\ n page:1,\ntotal:0,pages:1,rows: ', cols: '} Such JSON code, I believe the friends who have used the josn understand. In order to reduce the error I used a Third-party plug-in Newtonsoft.json, which is the Jsonconvert.deserializeobject () format of the Json string.

Of course, this feature plug-in for Web applications and internal Web sites, for the site is somewhat inappropriate, after all, from the SEO perspective directly generated by jquery data is not a good way to display. Not much to say, you can look at my code, if the plug-in has better suggestions or changes welcome to exchange.
Jquery+ashx No refresh gridview data display plugin download

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.