Forum


11:56

30/03/2009

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!
01:10

Moderators
30/10/2007

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.
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66