Donate

How To Wrap Text Inside A JqGrid Cell

When showing records from a datasource, you may wonder why a certain JqGrid cell does not wrap the entire text into it's cell. An example would be a lengthy description, notes or remarks, and address. After doing some research, the fix is to add a cellattr to the grid's cell and set it's white space property to normal.

JqGrid Address Cell without cellattr property
1
{ name: 'Address', index: 'Address', width: 200, align: 'left' }

How To Wrap Text Inside A JqGrid Cell
JqGrid Address Cell with cellattr property
1
2
3
{ name: 'Address', index: 'Address', width: 200, align: 'left', cellattr: 
function (rowId, tv, rawObject, cm, rdata) 
{ return 'style="white-space: normal;"' }},

How To Wrap Text Inside A JqGrid Cell

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

How To Insert Or Add Emojis In Microsoft Teams Status Message

TypeScript Error Or Bug: The term 'tsc' is not recognized as the name of a cmdlet, function, script file, or operable program.