Forum
17:44
17/04/2013
Hi all.
Well, my problem starts since I tried to do a grid with a subgrid. Already got it, a grid with another grid as a subgrid. I thought that the best way to edit the information that I recieve from the API server was to put a column with formatter: 'actions'. That offers me to edit each row as inline edit and another delete button, to simply delete that row.
I tried to send the edit and delete data serialized in JSON format. Had to search and search through internet… but I did not find anything useful. Not enough information through internet about how to do that. Atleast, I posted at StackOverflow my problem and Oleg helped me a lot.
He told me that to do that I need to add this at the beginning of my script.
$.extend($.jgrid.defaults, {
ajaxRowOptions: {contentType: "application/json", dataType: "json"…},
serializeRowData: function(data) { delete data.oper; return JSON.stringify(data); }
});
That to send edited data inline serialized. Thats too hard to know. Someone could do something easier if possible…
Well, leaving this apart, Its supposed that if I have an inline editing, at formatoptions in actions column in my colModel, I could use editOptions: {…} to set properties for inline editing like URL. Already used delOptions{…} and could set an URL to send the id of the row deleted and could set the serializeDelData to send that row in JSON format, but for editing I use URL property at editOptions and it doesnt work. It uses the URL of the iframe which is located.
I dont know if it is clear, but I think that is a bug. I did not defined an editUrl or something that could make that jqGrid goes "crazy".
If it is not a bug, I'd appreciate that someone gives me a solution.
If you need more information or need to clarify something, just ask me.
Thanks and greetings.
10:42
Moderators
30/10/2007
Hello,
Yes the best way is to prepare a test case.
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.
12:22
17/04/2013
Problem solved. Oleg showed me that there is an only way to define URL parameter for inlineEditing when you are using 'actions' column (edit and delete buttons column near each row).
You have to set 'url' property at 'formatOptions', that will be default URL for editing and delete rows unless you specify on 'delOptions' another URL at 'url' property of 'delOptions' or 'url' property of 'editOptions' (ONLY for form editing). Inline edit options don't have a property like those to specify an URL, then it uses 'default' URL editing specified at 'url' property of 'formatOptions'.
I hope this will help to someone that had my same problem.
Best regards.
12:36
Moderators
30/10/2007
Hello,
Please look at editurl option into the documentation.
Regards
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:08
10/08/2009
Just for clearing of reason I wanted to add my comment here. The error of was because of not enough clear documention of the options of parameters of formatOptions of the formatter: "actions". One can read in the documentation just the names of options. One can find editOptions, delOptions and many other options including the option url. One could misunderstand the option url as common URL option where editOptions, delOptions could contains separate URLs for editing and delete. Espesially the people who worked before with inlineNav could though so.
The problem is that formatter: "actions" supports editformbutton: true option. Only if one examins the source code of jqGrid one will see that properties of editOptions (inclusive the url property of editOptions) will be used only in case of form editing (in case of editformbutton: true). The inline editing methods uses properties defined directly in formatOptions.
So
url: "inlineEditingUrl", // used for inline editing
editOptions: { // defines only form editing options
url: "formEditingUrl" // use only with editformbutton: true
},
delOptions: {
url: "formEditingDeleteUrl"
}
}
I described the problem in "UPDATED 2" part of my answer.
Best regards
Oleg
16:16
Moderators
30/10/2007
Hello Oleg,
It is true, but it is really very difficult to support the docs in perfect way.
Anyway we continue to improve the grid and will try to make it easy for more users.
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.
Most Users Ever Online: 715
Currently Online:
63 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66