question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Whats the equivalent for ng-grid's beforeSelectionChange in ui-grid?

See original GitHub issue

In this section of the documentation: http://ui-grid.info/docs/#/api/ui.grid.selection.api:PublicApi

I see two events:

rowSelectionChanges and rowSelectionChangedBatch

What is the equivalent for beforeSelectionChange that was available back in ng-grid?

Why I need it and why I was using it in ng-grid?: When the user selects a row, an ajax call is performed. While this ajax call is happenning, I don’t want to allow the selection to be modified, so I used to do this:

    beforeSelectionChange: function () {
        return !($scope.doingAjaxCall);
    },

which locks selection if ajax is happenning

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
germangercommented, Nov 18, 2015

Sorry if it sounds pushy, but for me it is clearly a defect that ui-grid doesn’t have an easy way of disabling selection while an ajax call is happenning. ng-grid had an easy way for that.

defect: a shortcoming, imperfection, or lack.

ui-grid lacks this feature.

Regarding closing this question: maybe I should have written this question with the shape of a defect, and not as a question itself.

1reaction
PaulL1commented, Nov 18, 2015

You may not be aware of it, but your tone is somewhat pushy in that last comment.

If we had stated that the new ui-grid was a superset of all ng-grid functionality, then yes it would be a defect if ui-grid didn’t have some things that ng-grid used to. However, we didn’t state that. ui-grid has many of the features of ng-grid and tried to keep similar interfaces where we could. But there’s no guarantee it has all the features of ng-grid.

ui-grid has a way to achieve what you are seeking to achieve, your issue was actually a question as to how to use that capability. Stack overflow is the correct place for questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Whats the equivalent for ng-grid's "beforeSelectionChange" in ...
While the ajax call is happenning I set $scope.doingAjaxCall = true , and to prevent the user from changing the selection, I had...
Read more >
210 Selection - UI Grid
By default the selection feature will divide selection changes into batch events and single events, there are two different events provided in the...
Read more >
Angular Data Grid Overview and Configuration - Infragistics
Create super fast, responsive Angular data grids and tables with Ignite UI for Angular. Supports editing, filtering, data binding and many more. Try...
Read more >
Upgrading to ng-grid 3.0 (ui-grid) | technpol
You can also use curl to retrieve the files, or right click on them in your browser and select save as. As before,...
Read more >
Styling UI grid - Forum - Refinitiv Developer Community
I am using UI-grid to display data, and I would like to style it, so that gets Reuters look and feel. Could you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found