Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






New ver 3.3 Cell Editing error: No url is set

No Tags
UserPost

10:34
06/10/2008


Renso

PA

Member

posts 118

Getting an error when doing an inine cell edit via the new version 3.3             cellEdit: true option. When editing the filed and pressing tab or enter, gives me error: "No url is set" message. My editUrl is set and works fine for formedit. Do I need to set another property other than cellEdit?

11:27
06/10/2008


zupert

Member

posts 18

Man, you know that reading the source code is the best way to learn ?

have a look at the 'cellsubmit' property …

just put  cellsubmit: 'clientArray', and here you got the magic ..

12:24
06/10/2008


Renso

PA

Member

posts 118

I used cellsubmit: 'remote' to force an ajax call.

What does 'clientArray' do and for what is it used for?

Also, how can I add post data to the remote ajax request on save, I tried the following and it did not work:

            beforeSubmitCell: function()    {
                $(item).setPostData({'oper':'editCell'});
            },

so that the server knows what kind of operation is performed; i.e. edit of entire row, save of a new record, delete or editing a specific cell only.

12:33
06/10/2008


tony

Sofia, Bulgaria

Moderator

posts 7043

Hello,

I have put the 3.3 version for download. You should wait a little until the docs are ready.

In you case there is another option for this

cellurl :'someurl'

Use this and all wil be ok

Regards

Tony

14:48
06/10/2008


Renso

PA

Member

posts 118

Thank you Tony! Yes, I simply appended my parms to the url, thanks again. Maybe we can add a parm to indicate the actual field name updated during a cell update so that a person does not have to check each field to see which one was updated, maybe there is a easy way to do it with the existing framework?

Example, the user can update Street Address 1, 2, 3, City, State zip, etc, on the server I have to check on cellEdit which one is not null to figure out what had changed.

14:56
06/10/2008


tony

Sofia, Bulgaria

Moderator

posts 7043

Hello,

You do not need this. To this url automatically are passed the 

{id: rowid, cellname: cellvalue}

If you want to pass other parameters use beforeSubmitCell and return 

the needed values

Regards

Tony

15:05
06/10/2008


tony

Sofia, Bulgaria

Moderator

posts 7043

Hello,

You can use the savedRow parameter to check if the value is changed.

This array contain the data before editing the cell.

I hope this help

getGridParam('savedRow') will return

{id:iRow,ic:iCol,name:cellname,v:cellvalue_before_edit}

16:25
06/10/2008


Renso

PA

Member

posts 118

Tony, thanks again, but how do I get the new value? and once I have it and compare them to be the same, do I return false to avoid the ajax call?

16:55
06/10/2008


Renso

PA

Member

posts 118

Added the following line to the jqGrid to set a new property for the posted data, but it is not extended/added in grid.celledit.js line 145 in method saveCell. In lines 153 can we add an extend to add the additional custom properties to the post?

            beforeSubmitCell: function(id, cellName)    {
                $(myGrid).appendPostData({editCellColumn:cellName});
            },

So basically the appendPostData works but is not added to the postData property in saceCell. is this an issue or is there another way to do it?

08:52
07/10/2008


tony

Sofia, Bulgaria

Moderator

posts 7043

Hello,

beforeSubmitCell is something little difficult to other. It should return

values that can be posted to the server. Something like this

beforeSubmitCell: function(rowid,celname,celvalue, iRow,iCol) {

// do something here

return {myname1:myvalue,…}

These will be passed to the url again with rowid and cellname: cellvalue

Regards

Tony


No Tags

About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

157


Currently Online:

34 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 9656

Posts: 28942

Membership:

There are 10350 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1167

markw65 – 179

kobruleht – 144

phicarre – 126

YamilBracho – 124

Renso – 118

Administrators: admin (56 Posts)

Moderators: tony (7043 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information