Home  >  Article  >  Web Front-end  >  JQuery 应用 JQuery.groupTable.js_jquery

JQuery 应用 JQuery.groupTable.js_jquery

WBOY
WBOYOriginal
2016-05-16 18:13:481140browse

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

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

Figure 3, you can also group multiple columns according to the first column "Department" and the fourth column "Gender". Before grouping, sort the columns to be selected. This can be done when extracting data,

It is not implemented on the client side.

Figure 4. You can set the parameter collapse=1. Let the table shrink first. Its default value is 0;

By writing this JQuery control, I deeply appreciate its power. The entire code is less than 100 lines.

Inside ASP.NET. When gridView is displayed by default, the TBODY mark is not added. In order to display the GridView class content in TBODY, you can add the following code in the 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 gridview.


Package download

We welcome your comments.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn