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
cell editing technique.
22/01/2009
10:36
Avatar
RobGMiller
Member
Members
Forum Posts: 42
Member Since:
02/01/2009
sp_UserOfflineSmall Offline

I am trying to edit any cell in one of two ways. 1 - click on it to enter into cell edit mode where an input box allows me to enter data or 2 - click in it and a value is automatically entered. In either case, the action had changed other cells and these have to be saved as well. 

If I setup the grid to allow cell editing with the cellEdit: true option the first method works and saves the cell value to remote as expected when an editable cell is modified. Although, only id:(iRow) is sent.

There seems to be no way to enguage the after cell edit save process when the cell is modified programmatically.

To edit a cell programmatically, code is enguage as a response to onSelectCell which does fire on a non editable cell when cellEdit is set to true. However, it appears that saveCell(iRow, iCol) used after the appropriate cell(s) are modified will not post.

As a test, saveCell was called from a button with a row and column id specified. It does not post to the server weather the cell is editable or not.  

either jQuery(#gridid).saveCell(17,6); or jQuery(#gridid).saveCell(”17″,”6″); does not work. 

saveCell is defined in the documentaion as “saves the cell with the row index iRow( do not mix with rowid) in index column iCol”  

related grid options as follows:

cellEdit: true,

cellsubmit: 'remote',

cellurl: “updatecell.aspx”,

Should saveCell(rowid, iCol) save the content of any cell by sending a post to the server at any time?

If so what are the conditions that will allow saveCell to function as intended. 

What should be included in the POST?

22/01/2009
10:58
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

saveCell saves the current edited cell. If you try to save some cell dynamically you can use getCell method - something like

$("#mybutton").click(function(){

var rowid = $("mygrid").getGridParam('selrow'); //get the id of the current selected row. Can be a other thing.

var myceldata = $("mygrid").getCell(rowid,myiCol);

$.ajax({...}); //post your data here

});

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.

22/01/2009
12:30
Avatar
RobGMiller
Member
Members
Forum Posts: 42
Member Since:
02/01/2009
sp_UserOfflineSmall Offline

Thanks for the reply Tony, 

Its exactly what I needed. 

Rob..

Forum Timezone: Europe/Sofia

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

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information