Forum


12:02

07/07/2008

I know that getRowData(id) works when you are not editing, but when editing, the only thing that works for me is data of type textarea.
For instance,
ret = jQuery(”#list”).getRowData(id);
alert( ret['SomeCheckBox'] + ” ” + ret['SomeTextBox'] + ” ” + ret['SomeTextArea']);
I would get an empty string for ret['SomeCheckBox'] or ret['SomeTextBox'], but I would get the correct the actual text for ret['SomeTextArea']. Only textarea seems to do what I needed.
02:47

Moderators
30/10/2007

You can use the trick when using aftersave function in saveRow method.
Something like this:
var myaftersave = function(id){
var getrow = $("#mygrid").getRowData(id)
// do something here
}
then the calling
$("#mygrid").saveRow(id,tue,'','','','',myaftersave)
The only restriction is that this fires after you save the row
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:28

07/07/2008

Thanks for the help, Tony.
But I wanted to have some other way than pressing the enter key to save the row and esc key to cancel. I wanted to for instance, when you click on another row, it saves the previous row you edited. Similar to MS Access.
So I decided to write my own edit function using ajax calls. The problem is I can't get the data that was entered when editing. If it is all text area, it works like I hope using getRowData. Everything else gives me an empty string.
Any suggestion is greatly appreciated.
11:06

Moderators
30/10/2007

Go into the example page Roe Editing->Input Types
On place of jQuery('#rowed5').restoreRow(lastsel2);
change to jQuery('#rowed5').saveRow(lastsel2);
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.
13:39

Moderators
30/10/2007

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:
64 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