Bcbury
Bcbury

Reputation: 117

Deleted row in jQgrid returns when grid is reloaded or grid is paged

I have a grid, to which I'm making a delRowData(rowId) call to, whenever the grid gets reloaded using .trigger('reloadGrid') the deleted row returns, I can access the grid data and delete it from there, but I'd prefer not to, if I can avoid it.

To note, I need to reload the grid as I have custom subgrid tabs that get out of alignment when the row is deleted. The row also returns when I change pages on jqgrid's pagination.

Any suggestions?

Upvotes: 0

Views: 682

Answers (1)

Richard Chen
Richard Chen

Reputation: 463

.delRowData() function only deletes the row from clientslide if you don't use datatype: "local", once you trigger grid reload, it will get the data again from the server to fill your grid. So you can first delete the row on your server side, then in the jquery.ajax callback function you can invoke .delRowData() or some other function like this.

Upvotes: 1

Related Questions