Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Cell nowrap and conditional classes in jqgrid 3.6
13/11/2009
11:56
Avatar
Clement
Member
Members
Forum Posts: 48
Member Since:
30/03/2009
sp_UserOfflineSmall Offline

Hi,

I tried overridding the UI css with the following so that the cell content stays as one line height but it does not work. Has the reference changed? Firebug shows that the style was overridden but the cell content is unchanged.

<style>
      .ui-jqgrid tr.jqgrow td {white-space: normal}
</style>

In addition, I like to set the background color of a column depending on a value in thar row. Previously, I would construct the xml data within div tags with class name for the background color. It worked but the color does not fill up the entire cell due to padding in the parent TD tag.

<cell><![CDATA[<div class="${status}">${quantity}</div>]]></cell>

I read about gridview mode and that it is not compatible with afterInsertRow event. Hence I like to hear if any of the following approach is better in terms of system resources.

1) Use gridview mode and in gridComplete, add a function loop through the first page of data and set the cell background color.

OR

2) Use afterInsertRow, set cell background color.

OR

3) Other suggestions?

Thank you for your advice and help!

13/11/2009
15:09
Avatar
Clement
Member
Members
Forum Posts: 48
Member Since:
30/03/2009
sp_UserOfflineSmall Offline

For nowrap, this works..

<style>
      .ui-jqgrid tr.jqgrow td {white-space: nowrap;}
</style>

17/11/2009
01:10
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

The expression

<style>
      .ui-jqgrid tr.jqgrow td {white-space: normal}
</style>

Should work. Also be a sure that it is loaded after ui.jqgrid.css file.

As for the second - it depends how many data you load. If you load 20-50 records, you can use both, but if the records are relative to much I suggest the first one.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

17/11/2009
03:32
Avatar
Clement
Member
Members
Forum Posts: 48
Member Since:
30/03/2009
sp_UserOfflineSmall Offline

Hi Tony,

For (2), I have implemented option 1 as data size is dependent on user's setting on rownum.

Thanks!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
86 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information