Forum
15:53
04/08/2011
Hello,
I am using jqGrid in version 4.1.2, all my tests in Firefox 5 for now.
I want to do a simple thing: make a cell editable, and when I leave that cell / use the enter key, that cell should be validated and its new value should be sent per ajax.
But it does'nt work and I'm pretty helpless, having searched for 3hours now. Maybe you can help; First, here is my code:
jQuery("#linklist").jqGrid({
url: gridUrl,
mtype: "POST",
editurl: "/knowledge/linkoperations/source/<?php echo $this->common->getId(); ?>",
datatype: "json",
height: "100%",
sortname: 'objectlabel',
rowNum: 30,
colNames:['Id', 'Class raw name', 'Class', 'Name', 'Relation'],
colModel:[
{name:'id', index:'id', hidden:true},
{name:'classname', index:'classname', hidden:true},
{name:'classlabel', index:'classlabel', hidden:true },
{name:'objectlabel', index:'objectlabel', sortable:true, align:"left", formatter: objectlink },
{name:'relation', index:'relation', sortable:true, align:"left", editable: true, edittype:'text'},
],
pager: "#linklist-pager", // Footer id, for paging + delete button
caption: "",
autowidth: true,
multiselect: true,
cellEdit: true,
grouping:true,
groupingView : {
groupField : ['classname'],
groupText : ['<span class="title"><span>{0}</span> ({1})</span><span class="addlink"><a href="/knowledge/managelink/name/{0}/mode/new/source/<?php echo $this->id ?>" rel="linkmgmtform" onclick="addLink($(this)); return false;">Add link</a></span>'],
groupCollapse : false,
groupOrder: ['asc'],
groupColumnShow : [false]
}
});
Yeah so basically, this is a grid using grouping, and I want to edit the column called "relation".
You can see that both url and editurl are set. However, when I edit the cell in the grid and tap enter, I get the error message:
No url is set
As you might guess, this is akward. I really need a solution but I'm totally clueless.
ANy help is welcomed. Thanks!
15:30
04/08/2011
It's ok, the php bit appears in a view and is set with a value. So in the end the url is made of normal strings.
PHP echoes before the javascript is sent and interpreted by the browser so no problem here.
In fact I've tried with strings directly to be sure it wasn't my php bit. It is not. My question remains but thanks for the help.
10:49
Moderators
30/10/2007
Hello,
It would be better if you have looked 3 hours into the docs instead of serching something:
I suggest you to look here:
/jqgridwiki/doku.php?id=wiki:cell_editing
Maybe the grid options : "cellurl" is your solution
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.
10:17
04/08/2011
I don't have 3 hours to spend in the wiki. This is not a documentation, this is random bits of unstructured info. I couldn't find it and believe me I searched the wiki, my, I really did.
I used the site, the search, the demo page, read every case. But couldn't find it.
Anyway at long last, thanks.
Most Users Ever Online: 715
Currently Online:
53 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