Is default open particular page number using wj-flex-grid?

Posted by: ramu on 12 November 2019, 8:34 pm EST

  • Posted 12 November 2019, 8:34 pm EST

    Hi,

    I have used Wijmo 5.20171.282 version.

    My application used Angular 2.X version.

    I have set page size is 10 and total 500 records. I am going to navigate 12th page and edit one of the record. Once updated the record in database and rebind the flexgrid. It’ll shown in Page 1st.

    But I want to open the 12th page?

    In TS:

    this.Data = new wjcCore.CollectionView(items);

    this.Data.pageSize = 10;

    In HTML:

    {{Data?.pageIndex+1}}/{{Data?.pageCount}}

    <wj-flex-grid #userDataGrid id=“userDataGridWrapper” [headersVisibility]=“‘Column’” [isReadOnly]=“true” [itemsSource]=“Data” [selectionMode]=“‘None’”>









  • Posted 13 November 2019, 2:39 pm EST

    Hi Ramu,

    You can use the moveToPage method of the CollectionView class:

    this.Data = new wjcCore.CollectionView(items);
    this.Data.pageSize = 10;
    // page index starts from 0
    // therefore, for the 12th page
    // pass the value 11
    this.Data.moveToPage(11)
    

    Regards,

    Ashwin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels