Jquery + ashx brushless newest GridView data display plug-in (implement paging, sorting, filtering)

Source: Internet
Author: User

Reason: jquery is simple, compatible, and easily encapsulated. Let's talk a little bit about it. Let's start writing the Jquery plug-in now. There should be many people who have written similar plug-ins, and I also have some forms that mimic flexGrid.

Requirement: display data in the GridView, no refreshing paging, no refreshing sorting, no refreshing filtering (search for data), and implemented based on ASP. NET (we have implemented ashx processing files here ).

Technologies used: asp. net2.0, jquery, and css

First, I wrote about the jquery plug-in. The core function is jquery's ajax function, which is convenient and quick.
Copy codeThe Code is 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 );}
});

After reading this simple sentence, jquery is quite cool. For specific code, download the following attachment.

Let's take a look at the result graph after generation. (The style is not very nice. You need to modify the style by yourself)

 

Sorting and filtering

Jquery + ashx's refreshing paging Function

In fact, in addition to the main architecture of jquery acting as the entire plug-in, another important file is ashx, which generally processes files. Ashx outputs json Code such as {\ n page: 1, \ ntotal: 0, pages: 1, rows: '', cols:''} in my entire jqueryGrid plug-in, I believe all the friends who have used josn will understand. I used a third-party plug-in Newtonsoft. Json to reduce errors. This is the JsonConvert. DeserializeObject () function for formatting the json string.

Of course, this function plug-in is suitable for web applications and internal websites. It is not suitable for websites. After all, it is not a good display method for the data directly generated by jquery from the SEO perspective. Let's not talk about it. You can check out my code. If you have better suggestions or modifications to this plug-in, please contact us.
Jquery + ashx no-refreshing GridView data display plug-in download

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.