Apply JQuery. groupTable. js to JQuery.

Source: Internet
Author: User

I wrote a JQUERY plug-in. To achieve the effect of grouping.

 

Figure 2. This is a simple grouping effect, grouped by the first "Department" column of the table

Figure 3. You can also group multiple columns based on the first column "Department" and fourth column "Gender. Before grouping, sort the columns to be selected, which can be completed during data extraction,

It is not implemented on the client.

Figure 4. You can set the parameter collapse = 1 to contract the table first. The default value is 0;

 

By writing this JQuery control, I deeply realized its strength. The entire Code contains less than 100 lines.

In ASP. NET. The TBODY flag is not added when the gridView is displayed by default. To make the GridView class display in TBODY, you can add the following code in Page load:
GridView1.UseAccessibleHeader = true; GridView1.HeaderRow. TableSection = TableRowSection. TableHeader; GridView1.FooterRow. TableSection = TableRowSection. TableFooter;

In this way, you can use JQuery. groupTable to process the table generated by the gridview.

Package download

You are welcome to give more comments.

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.