Harshit
Harshit

Reputation: 721

Subgrid in ng-grid

I have just started with angularjs. Just wanted to know that if it is possible to create a sub grid inside another ng-grid. There would be some links in a column of the grid and when I click a particular link a grid corresponding to that link should be formed inside the already existing grid.The original grid would be having say 5 columns while the new grid will have say 4 columns. So something on the lines of colspan or something similar is what I look for.

Upvotes: 3

Views: 1570

Answers (2)

aked
aked

Reputation: 5815

If you are open for writing Angular Directive then you can use any grid ,other than ng-grid which has subgrid feature.

I know like Kendo Grid has subgrid feature and jqgrid has subgrid feature. I wrote a Grid using Google Closure library , this also has subgrid feature.

Upvotes: 1

user1027110
user1027110

Reputation: 1

If I understand your question, you need something like master/details inside grid, it not part of base functionality. nggrid has fixed row height, for virtual scrolling purpose. On our project we have created custom grid plugin base on nggrid

Solution that we used is:

  1. write custom sort function, which populate duplicated rows always below main

  2. when we click expand button we duplicate current row n-times depend on subgrid height

  3. in main row we create css overlay container which hides duplicated rows

  4. load overlay container content via ajax

When we click hide button, we hide overlay, and remove duplicated rows.

Upvotes: 0

Related Questions