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
SetColumn Visual Bug
03/09/2009
07:20
Avatar
Hannes Käufler
Guest
Guests

Hi guys.

Has anyone else noticed the following bug?

You activate a (by default hidden) column via the setColumn Dialog, and then you deactivate the very same column again. The first column in the grid is then stretched to a huge witdh and all the other columns are gone.

Would be nice to see a fix for that!

Greetings, Hannes

04/09/2009
02:53
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Could you please post the options in setColumns - i.e ...setColumns( options)?

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/09/2009
05:09
Avatar
Hannes Käufler
Guest
Guests

The only thing I have set in the options is to not show the colname

setColumns(

colnameview: false

})

11/09/2009
02:39
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Could not reproduce. Could you please send a link to the problem or the entry grid configuration.

Best 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.

13/09/2009
04:15
Avatar
Hannes Käufler
Guest
Guests

Well, this is the JS for the Grid basically:
$("#tbl_stakeholders").jqGrid({url: 'myurl',datatype: 'json',sortname: 'id',sortorder: 'asc',rowList: [10,20,50,100,200],mtype: 'POST',viewrecords: true,imgpath: 'myimgs',loadError: function(xhr,st,err) {
$("#tbl_stakeholders").html( 
"Type: "+st+"Response: "+ xhr.status + " "+xhr.statusText);
},width: '' + tbl_width(370) + '',height: '' + (($(window).height() - 270 ) / 2) + '',pager: jQuery("#stakeholders_pager"),forceFit: true,sortname: 'pm_stakeholders.lastname',rowNum: 50,colModel : [{ label: 'Nachname',name: 'pm_stakeholders.lastname',width: '100',align: 'left',sortable: true,search: true,hidedlg: true,hidefilter: true},{ label: 'Vorname',name: 'pm_stakeholders.firstname',width: '100',align: 'left',sortable: true,search: true,hidedlg: true,hidefilter: true},{ label: 'Anrede',name: 'pm_stakeholder_private_data.term_of_adress',width: '100',align: 'left',sortable: true,search: true,hidden: true},{ label: 'Titel',name: 'pm_stakeholder_private_data.title',width: '100',align: 'left',sortable: false,search: true,hidden: true},{ label: 'Straße',name: 'pm_stakeholder_private_data.street_adress',width: '100',align: 'left',sortable: false,search: true,hidden: true},{ label: 'Hausnummer',name: 'pm_stakeholder_private_data.house_number',width: '100',align: 'left',sortable: false,search: true,hidden: true},{ label: 'Postleitzahl',name: 'pm_stakeholder_private_data.postal_code',width: '100',align: 'left',sortable: false,search: true,hidden: true},{ label: 'Wohnort',name: 'pm_stakeholder_private_data.place_of_residence',width: '100',align: 'left',sortable: false,search: true,hidden: true},{ label: 'Land',name: 'pm_stakeholder_private_data.country',width: '100',align: 'left',sortable: false,search: true,hidden: true},{ label: 'Telefon',name: 'pm_stakeholder_private_data.home_phone_number',width: '100',align: 'left',sortable: false,search: true,hidden: true},{ label: 'Mobil',name: 'pm_stakeholder_private_data.mobile_phone_number',width: '100',align: 'left',sortable: false,search: true,hidden: true},{ label: 'Telefax',name: 'pm_stakeholder_private_data.home_fax_number',width: '100',align: 'left',sortable: false,search: true,hidden: true},{ label: 'E-Mail Adresse',name: 'pm_stakeholder_private_data.home_email_adress',width: '100',align: 'left',sortable: false,search: true,hidden: true},{ label: 'Geburtsdatum',name: 'pm_stakeholder_private_data.date_of_birth',width: '100',align: 'left',sortable: false,search: true,hidden: true},{ label: 'Familienstand',name: 'pm_stakeholder_private_data.marital_status',width: '100',align: 'left',sortable: false,search: true,hidden: true},{ label: 'Grad der Behinderung',name: 'pm_stakeholder_private_data.degree_of_physical_handicap',width: '100',align: 'left',sortable: true,search: true,hidden: true},{ label: 'Kinder',name: 'pm_stakeholder_private_data.children_count',width: '100',align: 'left',sortable: false,search: true,hidden: true},{ label: 'Religion / Konfession',name: 'pm_stakeholder_private_data.denomination',width: '100',align: 'left',sortable: false,search: true,hidden: true},{ label: 'Nationalität',name: 'pm_stakeholder_private_data.nationality',width: '100',align: 'left',sortable: false,search: true,hidden: true},{ label: 'Standort',name: 'pm_stakeholder_business_data.location',width: '100',align: 'left',sortable: false,search: true,edittype: 'select',editoptions: {value:"0:Alle;5:Nix;4:Ulm"}},{ label: 'Abteilung',name: 'pm_stakeholder_business_data.department',width: '100',align: 'left',sortable: false,search: true,edittype: 'select',editoptions: {value:"0:Alle;4:Programmierung"}},{ label: 'Kostenstelle',name: 'pm_stakeholder_business_data.cost_centre',width: '100',align: 'left',sortable: false,search: true,edittype: 'select',editoptions: {value:"0:Alle;5:111 - Kein Plan"}},{ label: 'Vorgesetzter',name: 'pm_stakeholder_business_data.superior',width: '100',align: 'left',sortable: false,search: false,hidden: true},{ label: 'Stellvertreter',name: 'pm_stakeholder_business_data.deputy',width: '100',align: 'left',sortable: false,search: false,hidden: true},{ label: 'Angestellt seit',name: 'pm_stakeholder_business_data.date_of_employment',width: '100',align: 'left',sortable: false,search: false,hidden: true},{ label: 'Tätigkeitsart',name: 'pm_stakeholder_business_data.function',width: '100',align: 'left',sortable: false,search: false},{ label: 'E-Mail Adresse',name: 'pm_stakeholder_business_data.email',width: '150',align: 'left',sortable: false,search: false,hidden: true},{ label: 'Kurzzeichen',name: 'pm_stakeholder_business_data.letter_symbol',width: '150',align: 'left',sortable: false,search: false},{ label: 'Mitarbeiter',name: 'separated',width: '100',align: 'left',sortable: false,search: true,edittype: 'select',editoptions: {value:"1:nur aktive;2:nur ausgeschiedene"},hidden: true,hidedlg: true,editrules: { searchhidden: true }},{ label: 'Aktionen',name: 'actions',width: '60',align: 'right',sortable: false,search: false}]}); }); 
It´s quite a lot of cols.
I then call the setColumn stuff via:
$("#tbl_stakeholders").navButtonAdd('#stakeholders_pager',{
  caption:"", 
  buttonicon:"ui-icon-pencil", 
  onClickButton: function(){ 
     $("#tbl_stakeholders").setColumns(
colnameview: false
});
  }, 
  position:"last"
});

13/09/2009
05:12
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Thanks. Will test this.

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.

04/10/2009
11:16
Avatar
Hannes Käufler
Guest
Guests

Hi tony, have you found anything yet?

Regards, Hannes

05/10/2009
02:30
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Which version of jqGrid is used?

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.

05/10/2009
07:17
Avatar
Hannes Käufler
Guest
Guests

We are using 3.5.0

Hannes

06/10/2009
07:43
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Could not reproduce. Could you please provide a link to the problem, or

look at this fix in 3.5 (if this is the problem)

"Fixed bug in setColumns method when we use two or more grids with the same names."

Best 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.

13/10/2009
07:13
Avatar
Hannes Käufler
Guest
Guests

Hi,

after some testing I found and fixed the Bug for me.

In grid.base.js on line 1758:

if(show == “none”) $t.p.tblwidth -= this.width; else $t.p.tblwidth += this.width;

to:

if(show == “none”) $t.p.tblwidth -= parseInt(this.width); else $t.p.tblwidth += parseInt(this.width);

It somehow interpreted this.width and $t.p.tblwidth as strings and therefore messed up the grid width.
I should add that I updated to jqGrid 3.5.3 (the GitHub version).
Greetings Hannes
13/10/2009
08:25
Avatar
markw65
Member
Members
Forum Posts: 179
Member Since:
30/07/2009
sp_UserOfflineSmall Offline

Hannes Käufler said:

Post edited 07:19 – 13/10/2009 by Hannes Käufler


It somehow interpreted this.width and $t.p.tblwidth as strings and therefore messed up the grid width.
I should add that I updated to jqGrid 3.5.3 (the GitHub version).

But /you/ provided the width's in your colModel!

Easy fix, with no changes to the grid:

width:50, rather than width:'50' Laugh

Also probably the better way to fix it, since colModel[i].width is used in a lot of other places without converting it to an int...

Mark

13/10/2009
11:36
Avatar
Hannes Käufler
Guest
Guests

Ha thank you!

Was a bug in the php class we use!

Regards, Hannes

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