I'm using a SlickGrid data table and some of my cells have very long text entries (1000 characters or more).
By default, SlickGrid only shows some of the text, and abbreviates the rest using an ellipsis.
This works well, except that I'd like to show the full text on mouseover, or have some other way to expand the cell to show the full entry.
Is this possible with SlickGrid, and if so how?
Just use this plugin:
https://github.com/mleibman/SlickGrid/blob/master/plugins/slick.autotooltips.js
Register it like this and you are done!
mygrid.registerPlugin(new Slick.AutoTooltips());
By default, SlickGrid disables word wrap. Given that you have your cell height set correctly, you'd be able to see all of your cell's text by editing slick.grid.css like this:
.slick-cell, .slick-headerrow-column {
position: absolute;
border: 1px solid transparent;
border-right: 1px dotted silver;
border-bottom-color: silver;
overflow: hidden;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
vertical-align: middle;
z-index: 1;
padding: 1px 2px 2px 1px;
margin: 0;
/*white-space: nowrap;*/
cursor: default;
}
来源:https://stackoverflow.com/questions/11503076/slickgrid-how-to-view-full-text-for-long-cell-entries