Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
great custom-edit feature
25/09/2010
13:14
Avatar
vivaldi
Member
Members
Forum Posts: 5
Member Since:
22/09/2010
sp_UserOfflineSmall Offline

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

.deleteRow(""+cl+"");

  ?

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

Много благодаря

=======================================================================

26/09/2010
11:21
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information