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_Related Related Topics sp_TopicIcon
Column header overwritten when using frozen columns together with jqueryui tabs
09/06/2013
13:10
Avatar
Daniele
Italy
Member
Members
Forum Posts: 4
Member Since:
09/06/2013
sp_UserOfflineSmall Offline

I have a page that shows two different grids in jqueryui tabs.

If I enable frozen columns the headers of the frozen columns in the hidden tab are overwritten by the first row of data.

You can see a test case here  http://jsfiddle.net/danypd69/quuvR/2/

check the second tab (Grid2) and you will see what I mean

11/06/2013
11:56
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

HEllo,

Thank you for the test cases. This help us.

Frozen Columns are not compatible with addRowData (sorry)

You can try to use data parameter in grid to add data and then call setFrozen Colummns.

In your case I think (not tested) this will work if you first add the data with fillGrid function and after this call setFrozen Columns.

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.

11/06/2013
12:15
Avatar
Daniele
Italy
Member
Members
Forum Posts: 4
Member Since:
09/06/2013
sp_UserOfflineSmall Offline

Hello Tony

It works on the simple test case with addRowData but not in my real case that uses json to load data.

I tried to move the setFrozenColumns() in the gridComplete event but it shows the same problem.

11/06/2013
12:24
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello Tony,

I thried to do this, but it not help. The problem is that jQuery.height returns 0 it the grid is hidden with display:none.

The most practical workaround would be to use activate callback of jQuery UI tabs, test whether the activating grid has whether frozenColumns parameter of jqGrid are set to true (grid already has frozen columns) and call setFrozenColumns if not. In the way one will call setFrozenColumns on visible grid on the first activation of the tab contains the grid.

Another more alegant solution would be changing calculation of height. One can use the trick from here (or here) where one use visibility: hidden !important; display: block !important; styles to mesure dimensions of elements which could be hidden.

Best regards
Oleg 

11/06/2013
13:12
Avatar
Daniele
Italy
Member
Members
Forum Posts: 4
Member Since:
09/06/2013
sp_UserOfflineSmall Offline

I tried to call setFrozenColumns in the callback, now the headers are shown correctly but when I scroll the table the headers are fixed but the data scrolls.

I will try to create a test case for it.

11/06/2013
15:33
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hi Daniele,

it's another problem. I described the solution here. You need just call  triggerHandler("jqGridAfterGridComplete") directly after setFrozenColumns.

Best regards
Oleg 

11/06/2013
15:47
Avatar
Daniele
Italy
Member
Members
Forum Posts: 4
Member Since:
09/06/2013
sp_UserOfflineSmall Offline

It works perfect.

Thanks a lot .

Forum Timezone: Europe/Sofia

Most Users Ever Online: 496

Currently Online:
32 Guest(s)

Currently Browsing this Page:
1 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