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
Label not changed in add Form
07/08/2009
04:46
Avatar
Rayson
Guest
Guests

Dear Tony,

I used setLabel() to modify labels of grid header, the corresponding labels on add Form did not changed.

Best regards,

Rayson

07/08/2009
04:54
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Dear Rayson,

It is a good start to check first the docs - especially for formediting and how to change the label:

http://www.trirand.com/jqgridw.....mmon_rules

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.

09/08/2009
23:01
Avatar
Rayson
Guest
Guests

Dear Tony,

Perhaps I confused you in the previous message. I don't want different labels in grid and form. I want to assign new labels to some columns and have the same new set of labels appear on both grid and form. As colModel and colNames cannot be changed during run time, I think setLabel() is the right command to use. However the newly assigned label only appear correctly on grid, the corresponding form label did not changed even if I did not specify a different label using formoptions.

Best regards,

Rayson

10/08/2009
05:15
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

In the form the label can not be changed dynamically with method.

Read carfully the docs and maybe you will need  to use some events like beforeShowForm.

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/08/2009
22:56
Avatar
Rayson
Guest
Guests

Dear Tony,

I tried modify setLabel in grid.base.js (line 1793) by changing 

if (nData){
    $("div",thecol).html(nData);
}

to

if (nData){
    $("div",thecol).html(nData);
    $t.p.colNames[pos] = nData;
}

It'll permanently update the values in colNames[]. The labels in Form are now correct and I don't see any side effect. See if you like to include that in your new build.

Best regards,

Rayson

13/08/2009
00:33
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Thanks for this. I missed that. Fixed in GitHub.

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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