Change FlexGrid pagesize using Javascript

Posted by: rick on 9 September 2021, 7:34 pm EST

    • Post Options:
    • Link

    Posted 9 September 2021, 7:34 pm EST

    Hey, so I have been fiddling around with Componentone MVC edition using flexgrid. So far so good however I ran into a problem I can’t seem to find a solution for. So I was wondering if you guys could help me out.

    I have a C1 flexgrid. and in my tag I define my page size.

    I don’t think that is the right property I am using however I have a dropdown somewhere else on my page and I would like to change the amount of rows the flexgrid displays on runtime. So I want to do that using Javascript.

    What is the right approach to do this?

    thanks in advance.

  • Posted 13 September 2021, 1:28 am EST

    Hello,

    Please refer to the below points for the resolution of the above query:

    1. If you are trying to use paging and wish to set the maximum number of rows allowed in a given page, then you may set the pageSize property of CollectionView.

    2. To update this at runtime, we may fetch the value from the dropdown and may simply update the same property by getting an instance of FlexGrid’s collectionview and then calling the refresh() method of CollectionView.

    Hope this clarifies your issue.

    Please refer to the below sample.

    Regards

    FlexGrid_Paging.zip

Need extra support?

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

Learn More

Forum Channels