Implement grid cell data of ext for long line feed display

Source: Internet
Author: User
Grid cells are omitted to display data. That is, when the content length exceeds the cell length, the excess parts are automatically hidden and the ellipsis is used... but sometimes we still want to display it completely, that is, using line breaks.

The simplest method is to directly modify ext-all.css, but it is generally not as intrusive as the ext source file, so you can implement it in other ways.
The method is actually very simple. You can determine whether the grid needs to be displayed with line breaks. If yes, add the following code: grid. Store. On ('load', function (){
Grid. El. Select ("table [class = x-grid3-row-table]"). Each (function (x ){
X. addclass ('x-grid3-cell-text-visible ');
});
});CSS file content:
. X-grid3-cell-text-visible. x-grid3-cell-inner {overflow: visible; padding: 3px 3px 5px; white-space: normal;} Source: yemoo's Js blog

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.