Skip to content

Refresh grid after delete #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
AnishLushte07 opened this issue Aug 7, 2017 · 5 comments
Open

Refresh grid after delete #55

AnishLushte07 opened this issue Aug 7, 2017 · 5 comments
Assignees

Comments

@AnishLushte07
Copy link

Hi, I'm using server pagination in grid .
after deleting one user i'm calling default refresh method but it is not fetching data from server.
and if i called refresh with 'isDefaultSort' - 'true' it throws error 'digest already in progress'
Please help, thanks in advance.

@Bilalriazwork
Copy link

@AnishLushte07 you want to grid data reload after delete ? In my case i use following method, it's working successfully. you will try it... Thanks

Add this code success function where you was assign JSON to grid.
$scope.refresh = true;
$timeout(function () {
$scope.refresh = false;
}, 0);

$scope.gridOptionsPaymentDetail.data = angular.fromJson(response.data);

@Bilalriazwork
Copy link

And also create $timeout object in top of [ ] angular js, before using it

@AnishLushte07
Copy link
Author

@Bilalriazwork Thanks for solution but in my case i'm calling default gridActions refresh method which internally calls reloadGrid. But the problem is that reload grid is not making call to fetch updated data.

@Bilalriazwork
Copy link

@AnishLushte07 Yes i was did gridActions refresh method. but it's not work.
in my case i used above method. it is working good. It is getting update data after transaction.

@AndreyChayko AndreyChayko self-assigned this Aug 18, 2017
@stodolos
Copy link

stodolos commented Mar 4, 2019

The reason that calls to refresh do not work is that the location of the page isn't changing (vs a filter or page number change), and the $locationChangeSuccess listener is what triggers the call to onChangeStateOrLocation, which in turn makes the call out to the server to happen. I wound up altering dataGrid.js to force a call to the onChangeStateOrLocation method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants