By Default I want my grid to be collapsed I tried
@ViewChild('grid') public grid;
public () {
this.gridView1.data.forEach((gr, idx) => this.grid.collapseGroup(idx.toString()));
}
and calling this method on button click however it is not working and throwing an error data undefined when I did define data and kept it public.
If you have a example that would be great