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_Related Related Topics sp_TopicIcon
Reload Row?
16/06/2010
00:14
Avatar
glittle
Member
Members
Forum Posts: 31
Member Since:
23/01/2010
sp_UserOfflineSmall Offline

Is there a way to reload only one row from the server?

I am using Cell Editing, and after editing some cells, I need to reload the entire row of data. (To see updated data from server.)

Can this be done automatically with Cell Editing?

If not, is there a method to reload one row from the server?

Thanks,

Glen

20/06/2010
11:36
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Not sure if this can be done automatically from the grid

Regards

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.

20/06/2010
18:14
Avatar
glittle
Member
Members
Forum Posts: 31
Member Since:
23/01/2010
sp_UserOfflineSmall Offline

Thanks Tony.

Currently, I am reloading the entire grid after editing...

Is there any method that can be used to reload one row?

I can send the data from the server in any format that might be needed...

Thanks,

Glen

23/06/2010
20:00
Avatar
DroidDr
Member
Members
Forum Posts: 7
Member Since:
27/05/2010
sp_UserOfflineSmall Offline

Hi,

Perhaps you can use a grid event like afterSubmitCell. Using the rowid of the event, you can do a request to the server to get the latest data. Would that work for you?

If you are not submitting to the server, you could use afterSaveCell and then from there do a request to the server?

After getting the data you can use the method setRowData.

I Hope this helps.

29/07/2010
21:01
Avatar
glittle
Member
Members
Forum Posts: 31
Member Since:
23/01/2010
sp_UserOfflineSmall Offline

Thanks for the advice...

I now track which cell I am editing in the "beforeEditCell" and save the info in a global variable:

beforeEditCell: function (rowid, cellname, value, iRow, iCol) { _cellInEdit = { row: iRow, col: iCol }; }

I then use "afterSubmitCell" and, when needed, call:

grid.setRowData(rowid, info.Data, null);

to set the data for the entire row to the new data I just got from the server in "info.Data".

In "afterSubmitCell" I also determine if the "_cellInEdit" is different from the one the "afterSubmitCell" was submitting. If it is different, user must have moved from one input cell to another... In that case, I restore the cell (sinces its value may have changed).

var newRow = _cellInEdit.row;
var newCol = _cellInEdit.col;

if (newRow != iRow || newCol != iCol) {
     setTimeout('$("#results").restoreCell(' + newRow + ', ' + newCol + ')', 0);
}

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
27 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