Forum
09:10
26/03/2010
I want to delete a row in the grid, but the grid always post's only the id and oper, I also want to post additional data like rowID. The funny thing is that for editing a row the POST variables like rowID, idAsigurator,persoana, cilindree are present. For deleting a row only the id and oper variables are present.
My jqgrid is something like :
jQuery("#editgrid").jqGrid({
url:'autoXML.php',datatype: "xml",
colNames:['RowID','Asigurator','Cilindree','Persoana', 'Perioada', 'Pret'],
colModel:[ {name:'rowID',index:'rowID', width:60, editable:true},
{name:'idAsigurator',index:'idAsigurator', width:100, editable:true,editoptions:{size:20}},
{name:'cilindree',index:'cilindree', width:90, editable:true,editoptions:{size:20}},
{name:'persoana',index:'persoana', width:300,editable:true,edittype:"select"},
{name:'perioada',index:'perioada', width:120, align:"right",edittype:"select",editable:true},
{name:'pret',index:'pret', width:80, align:"right",editable:true,editoptions:{size:20}}
],
width:900, height:600, pager: '#pagered', sortname: 'rowID', viewrecords: true,
sortorder: "desc", caption:"Autoturisme", editurl:"autoPOST.php"
});
jQuery("#editgrid").jqGrid('navGrid',"#pagered",{edit:true,add:true,del:true});
The xml file looks like this :<rows>
<page>1</page>
<total>1</total>
<records>5</records>
<row>
<cell>1</cell>
<cell>1</cell>
<cell>1401-1600 cmc</cell>
<cell>Pensionar</cell>
<cell>12 luni</cell>
<cell>155</cell>
</row>
<row>
<cell>2</cell>
<cell>1</cell>
<cell>1401-1600 cmc</cell>
<cell>Pensionar</cell>
<cell>12 luni</cell>
<cell>200</cell>
</row>
<row>
<cell>3</cell>
<cell>1</cell>
<cell>1401-1600 cmc</cell>
<cell>Pensionar</cell>
<cell>12 luni</cell>
<cell>300</cell>
</row>
<row>
<cell>4</cell>
<cell>1</cell>
<cell>1401-1600 cmc</cell>
<cell>Pensionar</cell>
<cell>12 luni</cell>
<cell>400</cell>
</row>
<row>
<cell>11</cell>
<cell>1</cell>
<cell>1401-1600 cmc</cell>
<cell>Pensionar</cell>
<cell>12 luni</cell>
<cell>500</cell>
</row>
</rows>Can someone please help me on this problem ...
Thanks
19:47
Moderators
30/10/2007
Hello,
use the onclickSubmit event. The event should return object which then will pe added to the posted data
http://www.trirand.com/jqgridw.....delgridrow
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.
Most Users Ever Online: 715
Currently Online:
39 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