PDA

View Full Version : ellipsis to displayfield



sandy52
19 Feb 2014, 9:58 PM
Hi,
How can i use ellipsis to displayfield

Thanks & Regards,
Sandy

mdnaveed42
19 Feb 2014, 11:29 PM
Ext.util.Format.ellipsis('LongverylongText', 10); //Longver...

Option 1:

xtype: 'displayfield',
fieldLabel: 'Label',
value: Ext.util.Format.ellipsis('LongverylongText', 10),
width: 100



Option 2:

xtype: 'displayfield',
fieldLabel: 'Label',
fieldCls: 'ellipsis-text',
value: 'LongverylongText'

CSS:
.ellipsis-text {
text-overflow: ellipsis;
overflow: hidden;
width: 50px;
}



Thanks,
Md Naveed
\m/

sandy52
23 Feb 2014, 9:06 PM
Thanks Naveed