jQWidgets Forums

jQuery UI Widgets Forums Angular Angular grid

This topic contains 1 reply, has 2 voices, and was last updated by  Ivo Zhulev 7 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Angular grid Posts
  • Angular grid #95332

    Gary
    Participant

    Using JQWIDGETS 4.5.4, Angular 4.3.2 and have run into a problem of executing Grid method expandallgroups() in Angular life cycle ngAfterViewInit().

    ngAfterViewInit(): void {
    this.gridList.expandallgroups();
    this.gridList.clearselection();
    this.gridList.selectrow(this.selectedAccountRowIndexValue);
    this.isFirstTime = true;

    }

    Have successfully executed when placed in other events.

    Thanks,
    Gary

    Angular grid #95343

    Ivo Zhulev
    Participant

    Hi Gary,

    In some occasions, the widget is not fully ready in the ngAfterViewInit call. In this case, you can either use the grid bindingcomplete event, or just set a timeout with no time:

    ngAfterViewInit(): void {
       setTimeout(_ => {
          this.gridList.expandallgroups();
          this.gridList.clearselection();
          this.gridList.selectrow(this.selectedAccountRowIndexValue);
          this.isFirstTime = true;
       });
    }

    Regards,
    Ivo

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.