Javascript table control: Chgrid, simplified

Source: Internet
Author: User

In the spirit of free sharing, you can post the code and test and add new functions together. Please refer to the questions raised by netizens, post all the modified versions below and use them as a comprehensive table software.
A Brief Introduction to Chgrid:
1: supports custom sorting
2: supports drag and drop of column width
3: Support for custom functions
4: pagination is supported.
5: Supports automatic numbering
6: supports multiple browsers, including ie6, ie7, ff, and opera.
7: div Layout

Known issues:
1: Because the div layout is used, if you use margin or padding, the defined column width will be changed. Currently, the text can only be centered or left or right, and the position cannot be controlled using padding.
Currently, the solution is to append a div in each div and use the margin attribute of this div to control its position.
2: When the content exceeds the container width, dragging will be a little problem ,.

How to modify a style:
If you do not change the style, you only need to adjust the following part of the code.
Chgrid_column0 {width: 20px ;}
. Chgrid_column1 {width: 100px ;}
. Chgrid_column2 {width: 80px ;}
. Chgrid_column3 {width: 120px ;}
. Chgrid_column4 {width: 100px ;}
Add a row for each column, for example,. Chgrid_column5 {width: 100px ;}
Note: The last column does not need to define the width, and the program will automatically adjust it.Xmlns = "http://www.w3.org/1999/xhtml">


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.