Ng-grid vs. ui-grid [closed]
Asked Answered
F

3

28

I looked at the angular-ui modules because I need to implement a grid.

I saw that there is the stable ng-grid and the unstable version ui-grid.

Which version should I use?
Are they very different or hard to switch?

Flytrap answered 6/10, 2014 at 8:4 Comment(3)
So which one did you choose ? How did it go ?Forsythe
I'm curious as well which one you chose. If one went with ui-grid, would one be able to easily use most of the same code with ng-grid, if ui-grid did break?Subtonic
I didn't need the grid after all. Sorry guys :)Flytrap
I
26

The github repo says that all development will happen on ui-grid (ng-grid 3). That means ng-grid has become a legacy grid. ui-grid is stable enough to use in my opinion and the only reason to use ng-grid is if you already started with it. New projects would be better off using ui-grid. They also claim that the performance of ui-grid is better than that of ng-grid though I haven't tested that.

UPDATE:

A stable version of UI Grid 3 is out which means that it can be used in production applications. On their documentation site, they have a guide on how to upgrade from legacy ng-grid. See Tutorial: 099 Upgrading

Intervenient answered 28/10, 2014 at 8:24 Comment(2)
I am building a new web app from scratch and tried ng-grid and ui-grid in the beginning. Some of my grids had 1000-2000 rows and I can say that ui-grid was MUCH faster than ng-grid for this. From memory, ng-grid was displaying in about 60 seconds, and for ui-grid, it was around 1 second. So, I would agree with the ui-grid performance claims you mentioned.Slatternly
We used ng-grid 2.x in production 3.x (ui-grid) - is probably 2-3x faster than the previous (and is now in general availability release)Homogeneity
H
11

It's the same project. ng-grid is older (version 2.x), UI Grid is newer (version 3.x) but not officially relased yet (currently in release candidate status). They're very similar, compare the tutorials for v2 (ng-grid) and v3 (UI Grid).

Edit (Nov 12 2014): One major feature from v2 that is still missing in v3 is grouping (github issue). If that's something you can't do without stick with v2 for now.

Handcrafted answered 6/10, 2014 at 9:2 Comment(1)
Just a note: an evaluation grouping feature has been added to the 3.x codebaseSeftton
G
6

ui-grid is replacing ng-grid, and support for ng-grid is getting thin as most of the original (2.x) contributors are no longer active, the remaining contributors are almost exclusively working on 3.0 only.

So, I would use ng-grid if:

  • you are already using it and don't have any pressing issues that would force an upgrade
  • you really need a stable and well tested product

I would use ui-grid if:

  • you are starting a new project now, and not intending to be in production for a few months
  • you need a feature that ui-grid offers and ng-grid doesn't (such as exporting, importing, state saving), or specific functions that ui-grid offers
  • you plan on extensively customising or pushing the limits of the functionality - ui-grid is more customisable and more supportable
  • you have tried it and it does everything you want
  • you don't need IE support earlier than IE9 (and mostly IE10 and up only)

In general, I'd lean towards ui-grid unless you can't use it for some reason.

Note also that grouping was recently released in alpha.

EDIT: We've also recently noticed that Amazon Web Services are using ui-grid in their console in a couple of places....so I guess that partly answers the question as to whether it's ready for production usage.

Gutta answered 15/3, 2015 at 23:4 Comment(1)
do you know whats the equivalent for ng-grid beforeSelectionChange in ui-grid ?Hauler

© 2022 - 2024 — McMap. All rights reserved.