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
Frozen Column Impressions
20/01/2012
16:47
Avatar
SteveT
Member
Members
Forum Posts: 14
Member Since:
08/06/2009
sp_UserOfflineSmall Offline

We wanted to use frozen columns to only freeze the checkbox column on the left (multiple: true).  

I found that if I set frozen: true to a hidden column that is at the beginning of the column list, I can accomplish this.   Maybe there is a better way?

We display various HTML in our grid including images, text with line breaks, etc.  I noticed that if the height of a non-frozen cell is greater than the height of the frozen column they will get misaligned.  We can't currently use frozen columns because of this.  This might be the same problem as:

http://www.trirand.com/blog/?p.....=all 

Thanks for all the great work you do!

20/01/2012
18:28
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello!

I find that you found a good method to do what you need. The problem is that frozen columns is the new feature. After small modifications it can be used in more cases as where it currently used. The method setFrozenColumns tests some criteria and exit in some situaltion like in your case. So one should just deceive it.

I tought about your problem and now I can suggest you one more method to solve the problem. The demo, which I created for you, demonstrates this. The demo is the modification of my demo from the answer. The main part of code which solve your problem is below:

$grid.jqGrid('setColProp', 'cb', {frozen: true});
$grid.jqGrid('setGridParam', {multiselect: false});
$grid.jqGrid('setFrozenColumns');
$grid.jqGrid('setGridParam', {multiselect: true}); 

As the results you will receive the frozen column with the multiselect checkboxes only.

One more benifit of the demo is that it supports editing: inline editing too. Typically inline editing are not supported with the frozen columns (see here), but using the tricks which I described in the refferenced answer on the stackoverflow.com it is do possible to use inline editing if you have no editable frozen columns. In my demo I used double-click event to start inline editing. You can try the demo and see the results like

Image Enlarger

Best regards
Oleg

23/01/2012
21:05
Avatar
kobruleht
Member
Members
Forum Posts: 144
Member Since:
05/05/2011
sp_UserOfflineSmall Offline

Thank you.

I added code from the demo to my applicaton but cb column is not froozen. I looks like code is ignored. I added alert() boxes and verified that code is actually running.

I'm no idea what I'm doing wrong. How to solve or debug this issue?

How to froze action button column also ?

24/01/2012
12:37
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Sorry, but is my demo work correctly in your environment? If it works than you should debug your code and verify why the setFrozenColumns method still not executed. Probably you use some additional options of jqGrid which are not supported by frozen columns (see the limitations here)? For example you could uses scroll:1 (scroll:true) or something like that.

Best regards
Oleg 

24/01/2012
13:08
Avatar
kobruleht
Member
Members
Forum Posts: 144
Member Since:
05/05/2011
sp_UserOfflineSmall Offline

Thank you. Removing sortable:true fixes thy issue.

Unfortunately other column re-ordering is more important so I cannot use frozen columns this case.

How to allow unfrozen column re-ordering if only cb (and maybe actions column also)  are frozen ?

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
60 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