igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

In Persistent State directive isnt column group stored?

Open amitmoondra opened this issue 6 years ago • 11 comments

I am using igxGridState directive to store the state, but found one issue which is i am not able to reapply column group header again after the state data is applied, can you guide me in the right direction please

amitmoondra avatar Nov 03 '20 16:11 amitmoondra

Can you provide me an example of how to restore multi column header/column grouping when saving data in state

amitmoondra avatar Nov 03 '20 18:11 amitmoondra

@amitmoondra, I am marking this as a feature request.

Meanwhile, you can either

  1. skip restoring columns when Multi Column Headers are available (State Persistence will still properly restore sorting, filtering, etc in a child column).

or

  1. Implement custom managing of the columns (keep the column configuration and create grid columns dinamically from it, as shown in this sample

hanastasov avatar Nov 04 '20 09:11 hanastasov

Hi @hanastasov , I did implement the second way of creating columns, which is fine worked. But now while applying the state after creating column dynamically, how would i achieve that? still the issue here is reapplying the state => if i just recreated the columns the state is lost completely of columns isnt it. I want to be able to reapply grouping and such after reappyling the column state.

amitmoondra avatar Nov 04 '20 13:11 amitmoondra

When you get/set the state of the grid, exclude the columns from it. try to store your columns config elsewhere, and try to recreate them on ngAfterViewInit opn your own, using the code provided.

After columns are recretared, you can restore the grid state using the setState Api.

Something similar to this.

hanastasov avatar Nov 04 '20 13:11 hanastasov

Yeah i figured that out, apologies for not informing before. Already done that and it works perfectly.

amitmoondra avatar Nov 04 '20 14:11 amitmoondra

I have successfully implemented using the work around way, I hope this feature request is done soon, as this would be very helpful to be stored in state and can be very useful in many cases or other users as well. I hope this ticket wont be closed until the feature request is completed right?

amitmoondra avatar Nov 04 '20 16:11 amitmoondra

I am glad the suggested works for you. Yes, the issue will stay opened until resolved.

hanastasov avatar Nov 04 '20 16:11 hanastasov

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Jan 05 '21 00:01 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Mar 07 '21 00:03 github-actions[bot]

Is there any information on when this issue will be resolved/planned?

EddyNll avatar Aug 16 '21 13:08 EddyNll

Hi @EddyNll, the issue is in the planning for the next Sprint, starting on 30th of Aug.

radomirchev avatar Aug 23 '21 11:08 radomirchev