Forum


13:14

22/09/2010

Hello,
I have seen one of the options of the jqgrid, where there are 3 buttons edit, save, cancel in one column so as to be able to edit the row. How can I get to add one more row to that table every time I need it?. Also, the button for Deleting would need to be there.
Looking at the code I can see that delete statement would go here but …
se = "<input style='height:22px;width:20px;' type='button' value='S' onclick="jQuery('#rowed2').saveRow('"+cl+"');" />";
ce = "<input style='height:22px;width:20px;' type='button' value='C' onclick="jQuery('#rowed2').restoreRow('"+cl+"');" />"; jQuery("#rowed2").jqGrid('setRowData',ids[i],{act:be+se+ce});
would it be as easy as to do it as
?
so the 2 questions are:
1) How can I add a new row
2) what the syntax code would look like for the additional Delete button I need.
by the way, the code seems to be incomplete with starting ... and trailing ...
would it be possible to have a full code ?
thanks a lot
Много благодарÑ
=======================================================================
11:21

Moderators
30/10/2007

Hello,
It seems like the inline edit is discussed here - is this right?
1) There is a method named addRowData - this method add a row into the grid, but not into the server.
The scenario can be something like this.
add a row using addRowData (see docs) - since you know the id of the added row then you can use immediatley editRow with special parameter to add a row on server when user press enter or save button.
2) there is a method named delGridRow - see documentation
P.S. You can use the experimentall formatter named "actions". A exmple can be seen here:
http://www.trirand.com/blog/ph.....efault.php
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:
74 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