Handsontable Merging headers

Source: Internet
Author: User

Want to do Excel-like operations on the page, found that handsontable meets the requirements.

And then found this article

http://blog.csdn.net/wynan830/article/details/9054195

The author extends the handsontable implementation of multiple headers.

The Removerowplugin property is also added to perform the delete operation by displaying a delete button in front of each line.

I do not need to delete the page, so set the Removerowplugin to False. But there was a wrong line in the table header.

View the generated HTML discovery with one more column in the header: <th class= "Htnoframe htremoverow" ></th>.

Add in CSS

. handsontable Th.htNoFrame.htRemoveRow {
width:0px
}

does not work. PS: Is there a problem with this CSS notation I added?

In Jquery.handsontable.js, the original author added the Treetoth function to handle multiple headers

The original code is:

Datastr + = ' <tr> '; Datastr + = ' <th class= ' htnoframe htremoverow ' ></th> '; Datastr + = ' <th ></th> ';

Visible does not determine whether the Delete button column needs to be displayed

Modified to:

Datastr + = ' <tr> '; if (usersettings.removerowplugin! = null && usersettings.removerowplugin) {       Datastr + = ' <th class= ' htnoframe htremoverow ' ></th> ';   } Datastr + = ' <th ></th> ';

Handsontable Merging headers

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.