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