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
Fixed size columns
28/10/2009
11:16
Avatar
pbor
Member
Members
Forum Posts: 33
Member Since:
01/09/2009
sp_UserOfflineSmall Offline

it would be great to be able to mark some of the columns of the colmodel as 'fixed size', so that even when changing the size of the whole grid, the width of such columns is not scaled.

As far as I can see right now only some "special" columns behave like this (e.g. the column containing checkboxes when multiselect is enabled) while when increasing the width the width of all the columns is increased proportionally.

The use case is that sometimes you have columns that should not grow, for instance a table with two columns:

 - one containing an ID of 5 digits should never bec

 - one containing a description

When setting the size of the table only the description column should grow.

28/10/2009
13:42
Avatar
lotjuh
Member
Members
Forum Posts: 28
Member Since:
06/09/2009
sp_UserOfflineSmall Offline

I'm in need of the same feature. It's nice that the grid has an option to force the grid to de with of it's parent, but columns with the 'width' parameter given should be ignored when adjusting the column widths to accomplish this.

29/10/2009
03:03
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Just now I have added this feature. Now we have a new property in colmodel - fixed. If set to true it do what you want.

The code is in GitHub 3.6 branch

Enjoy.

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.

29/10/2009
04:43
Avatar
lotjuh
Member
Members
Forum Posts: 28
Member Since:
06/09/2009
sp_UserOfflineSmall Offline

thanks a lot!

29/10/2009
09:38
Avatar
pbor
Member
Members
Forum Posts: 33
Member Since:
01/09/2009
sp_UserOfflineSmall Offline

Awesome!

05/11/2009
07:52
Avatar
lotjuh
Member
Members
Forum Posts: 28
Member Since:
06/09/2009
sp_UserOfflineSmall Offline

There's a little bug with the new 'fixed' option.

If all the columns have the 'fixed' option set, the grid won't load anymore. Just thought you'd like to know (-;

05/11/2009
09:31
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello lotjuh,

Thanks. Fixed in 3.6RC

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.

10/11/2009
16:40
Avatar
friflaj
Member
Members
Forum Posts: 17
Member Since:
09/11/2009
sp_UserOfflineSmall Offline

I do this by just sticking "fixed:true" in the colmodel for this column, right? I have the colmodel below, but the rank column still allows resizing. Clues appreciated. I'm on 3.6:

        colNames: ["id","Rank", "ID", "Name", "State", "Size/Hours", "To do", "Owner", "Failures" ],

        colModel:[

            {name:'id',index:'id', width:1,hidden:true,key:true},

            {name:'rank',index:'rank', width:40, fixed:true},

            {name:'itid',index:'itid'},

            {name:'name',index:'name'},

            {name:'state',index:'state'},

            {name:'size',index:'size'},

            {name:'remaining',index:'remaining'},

            {name:'owner',index:'owner'},

            {name:'failures',index:'failures'}

            ],

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

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

Hello,

Also as described this option is used when you try to resize the grid with setGridWidth, in order to do what you want you need another option - set resizable to false in colModel of that column

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/11/2009
03:15
Avatar
friflaj
Member
Members
Forum Posts: 17
Member Since:
09/11/2009
sp_UserOfflineSmall Offline

Excellent! Thanks!

11/01/2011
20:08
Avatar
McCulloch
Toronto, ON, CA
Member
Members
Forum Posts: 6
Member Since:
11/01/2011
sp_UserOfflineSmall Offline

That is just what I needed. Thanks!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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