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
How do I add post data to the dataUrl in editoptions?
18/05/2010
06:07
Avatar
tim
Calgary Alberta Canada
Member
Members
Forum Posts: 61
Member Since:
04/11/2009
sp_UserOfflineSmall Offline

I know the first response I will get will be -> "use setColProp in formatCell event".

But I've been down that road and back again. setColProp is just too buggy and has too many side-effects for me to use reliably.

I've read almost every post on this forum and I've seen a half a dozen posts with users asking how to accomplish this, normally 'setColProp' is the only work-around.

Is there anyone that has been able to do this and can help?

I really just need to append the rowId:

colModel [...

editoptions:{dataUrl:'myurl?rowId='+rowid,....

....]

Thanks

tim

20/05/2010
20:09
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

var myurl = 'myurl?rowId='+rowid;

$("#grid").jqGrid('setColProp','mycol',{editoptions:{dataUrl:myurl}});

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.

20/05/2010
20:22
Avatar
tim
Calgary Alberta Canada
Member
Members
Forum Posts: 61
Member Since:
04/11/2009
sp_UserOfflineSmall Offline

Hi Tony,

I realize you're pretty busy, but if you could please look into this a little further.

There are 2 issues with setColProp (I have to use it with formatCell to support dynamic selectboxes) :

1. tabbing does not support the correct event sequences as posted here:

http://www.trirand.com/blog/?p.....bing-over/

2. When using formatCell with setColProp, pre-existing editoptions are lost – they do not work (example add 'size: 14' to the colModels editoptions, and you'll discover formatCell kills it.)

This is a real problem. I would rather have the column model editoptions dataUrl support post data, and I think doing this would benefit everyone for other things, but I could live with any solution that has no bugs.

Please and Thanks,

tim

25/05/2010
02:46
Avatar
tim
Calgary Alberta Canada
Member
Members
Forum Posts: 61
Member Since:
04/11/2009
sp_UserOfflineSmall Offline

bump..... nothing?

tim

28/05/2010
06:18
Avatar
tim
Calgary Alberta Canada
Member
Members
Forum Posts: 61
Member Since:
04/11/2009
sp_UserOfflineSmall Offline

Tony,

My js skills are non-existent so I will not even think about checking anything in github, but here's somethin to think about:

grid.common.js : line 246

- function createEl(eltype,options,vl,autowidth, ajaxso) {
+ function createEl(rowid,eltype,options,vl,autowidth, ajaxso) {

grid.common.js : line 319

- url: options.dataUrl,
+ url: options.dataUrl+'&rowId='+rowid,

// may want to pass a variable into define the rowId arg name

// handle '?' vs. '&' … dependant upon url? – all mine will not require it

grid.celledit.js : line 75

- var elc = createEl($t.p.colModel[iCol].edittype,opt,tmp,true,$.extend({},$.jgrid.ajaxOptions,$t.p.ajaxSelectOptions || {});
+ var elc = createEl($t.rows[iRow].id,$t.p.colModel[iCol].edittype,opt,tmp,true,$.extend({},$.jgrid.ajaxOptions,$t.p.ajaxSelectOptions || {});

grid.inlineedit.js : line 41
- var elc = createEl(cm[i].edittype,opt,tmp,true,$.extend({},$.jgrid.ajaxOptions,$t.p.ajaxSelectOptions || {}));
+ var elc = createEl(rowid,cm[i].edittype,opt,tmp,true,$.extend({},$.jgrid.ajaxOptions,$t.p.ajaxSelectOptions || {}));

grid.formedit.js : line 738
- elc = createEl(this.edittype,opt,tmp,false,$.extend({},$.jgrid.ajaxOptions,obj.p.ajaxSelectOptions || {}));
+ elc = createEl(rowid,this.edittype,opt,tmp,false,$.extend({},$.jgrid.ajaxOptions,obj.p.ajaxSelectOptions || {}));

tim

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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