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
Automatically trigger reload on delete?
23/08/2011
02:44
Avatar
psdev
Member
Members
Forum Posts: 9
Member Since:
23/08/2011
sp_UserOfflineSmall Offline

Hi, 

Thanks for such an awesome component!  I have been scouring the forums and the documentation trying various permutations of things but am starting to find a few problems I can't figure out.  Hopefully someone more experienced with jqgrid doesn't mind helping a noob like me with this.

What is the best way to get the grid to automatically reload after an inline delete?  I am using the jqgrid with json feeding from a java app from the google app engine datastore and it is working well  - but after a delete I have to manually click the grid's reload button or reload the page to show the row gone.  How can I set it up to automatically reload after a successful delete?

Please give me a code example or a link to one, because my attempts aren't working.

I tried setting something up with saverow but it messes up the inline editing when I try to set up the successfunc.

thanks for your help! 🙂

26/08/2011
01:17
Avatar
psdev
Member
Members
Forum Posts: 9
Member Since:
23/08/2011
sp_UserOfflineSmall Offline

Not sure, but I may have figured this out.  I thought that the grid didn't update automatically, but it seems that it is intermittent - but that may be on my end because I am using Google app engine locally for testing.

It's possible that this is a timing thing - where the grid does its refresh before the app-engine's datastore actually replicates and saves the item -- I'm told this app-engine thing is likely to not be so slow when actually running on google  - I will deploy it and I bet the auto-trigger reload grid will work after delete when it is running up there.

just posted this in case anyone else is using JSON with the Google app-engine and the jqgrid.

27/08/2011
00:49
Avatar
emascarinas
United States
Member
Members
Forum Posts: 5
Member Since:
09/08/2011
sp_UserOfflineSmall Offline

try this. 

		delOptions: {reloadAfterSubmit:true,
		onclickSubmit: function(rp_ge, rowid) {
                     // delete row
					 var grid = jQuery("#"+subgrid_table_id);
                     grid.delRowData(rowid);
                     

                     if (grid[0].p.lastpage > 1) {
                         // reload grid to make the row from the next page visable.
                         // TODO: deleting the last row from the last page which number is higher as 1
                         grid.trigger("reloadGrid", [{page:grid[0].p.page}]);
                     }

                     return true;
			                     
				                 }					
						}
29/08/2011
04:07
Avatar
psdev
Member
Members
Forum Posts: 9
Member Since:
23/08/2011
sp_UserOfflineSmall Offline

thanks 🙂

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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