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
Is there a way to get row data while editing a row?
07/07/2008
12:02
Avatar
son122
Member
Members
Forum Posts: 32
Member Since:
07/07/2008
sp_UserOfflineSmall Offline

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.

07/07/2008
12:45
Avatar
son122
Member
Members
Forum Posts: 32
Member Since:
07/07/2008
sp_UserOfflineSmall Offline

Currently I have this written in ASP.Net 3.0 MVC + Linq to SQL DB.

Everything is working wonderfully.  Great plugin!!

Only getRowData is not working like I'd hope.

08/07/2008
02:47
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

08/07/2008
10:28
Avatar
son122
Member
Members
Forum Posts: 32
Member Since:
07/07/2008
sp_UserOfflineSmall Offline

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.

08/07/2008
11:06
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

08/07/2008
11:36
Avatar
son122
Member
Members
Forum Posts: 32
Member Since:
07/07/2008
sp_UserOfflineSmall Offline

Wow...that did it!

I can't thank you enough, Tony.

I really appreciate the help.

25/07/2008
13:33
Avatar
son122
Member
Members
Forum Posts: 32
Member Since:
07/07/2008
sp_UserOfflineSmall Offline

Hey Tony,

When clicking the row for editing, is there any way to detect if there are changes, then it should save?

25/07/2008
13:39
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

25/07/2008
14:56
Avatar
son122
Member
Members
Forum Posts: 32
Member Since:
07/07/2008
sp_UserOfflineSmall Offline

Thanks Tony,

I got it to work.  You have been incredibly helpful.

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