Forum


21:50

21/07/2012

I have created a grid using the tableToGrid() method. I set the grid width as 800 px, and each column width appropriate for the size of the heading and the data in that column. In the call to tableToGrid(), I am using all default options except for rowNum, width, height, and colModel (to set col align, width and sorttype).
My issue is, when I click on a column header to sort by that column, the sort arrows (asc/desc) are not visible because I have sized the width of the column to be just wide enough for the header and data (these are fairly narrow columns).
I would rather not add extra width to every column to handle the possibility of a sort icon, because that would make the table horizontally scrollable or too wide for the html page. Ideally, I would just like the column being sorted (let's ignore multi-col sort for now) to grow in width whenever the sort arrow icon needs to be displayed. I could make the total table width be the sum of my column widths plus extra width for one sort arrow icon.
Alternatively, is there some way of indicating which column the grid is currently sorted by without modifying the width of the column, such as a column background color, or an icon above/below the header text, which would not change the width?
Or is there some grid feature/technique that accomplishes my goal of having the grid width remain less than or equal to my total grid width specification but still allow the sort arrow to appear?
Thanks, Keith.
Most Users Ever Online: 715
Currently Online:
38 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