FlexGrid Virtual / ServerSide Data

Posted by: warrenmira on 12 February 2018, 10:31 pm EST

    • Post Options:
    • Link

    Posted 12 February 2018, 10:31 pm EST

    Hi,

    Does FlexGrid fully support this? I checked the ODataVirtualCollectionView and it seems that if the server side has 1,000,000 rows and I only retrieved 1000 rows to display, I would still need to create an array with 1,000,000 rows with the other elements null?

    Is this a correct understanding?

    Thanks

  • Posted 12 February 2018, 11:36 pm EST

    Hi,

    The ODataVirtualCollectionView class implements a ‘data window’ so only data that is actually being displayed is loaded from the server. Items that are not being displayed are added to the collection as null values until a call to the setWindow method causes them those items to be loaded.

    If you looking for something else or If I did not understand your query then please feel free to elaborate

  • Posted 13 February 2018, 12:08 am EST

    If the data on the server is 1,000,000 do I need an array that also has 1,000,000 elements with null values on the elements that are not being shown?

    Wouldn’t this caused memory issue? If I do scroll and I started filling the array with values? Is this how it works as I understand it?

  • Posted 13 February 2018, 1:01 am EST

    No, you do not need to explicitly define an array with 1,000,000 elements with null values. This is managed internally using the ODataCollectionView which handles the null values and also ensures that memory is optimized .

    http://demos.wijmo.com/5/Angular/WijmoHelp/WijmoHelp/topic/wijmo.odata.ODataCollectionView.Class.html

  • Posted 13 February 2018, 2:09 am EST

    I’m trying implement something like an ODataCollectionView because the backend I have is not OData complaint. I notice that the only way for the flex grid to know how many data is there is via checking the size of the array. How do we usually tell it? What is the method in the OData that determines this?

    Btw, is flexgrid opensource? Would like to read the source? Thanks

  • Posted 13 February 2018, 3:04 am EST

    I would suggest you to take a look at the ServerCollectionView Sample instead and check if it meets your use case.

    The sample implements a simple data service and a ServerCollectionView class that runs on the client.

    The data service supports paging, sorting, and filtering on the server. The sorting and filtering are implemented using the System.Data.DataTable class on the server.

    The data service also provides CRUD support via a REST API similar to the one defined by the OData protocol.

    Sample → http://demos.wijmo.com/5/SampleExplorer/SampleExplorer/Sample/ServerCollectionView

    What is the method in the OData that determines this?

    There is property totalItemCount which return the Total Number of items in the view before paging is applied.

    Btw, is flexgrid opensource? Would like to read the source? Thanks

    Sorry, the code is not open source.

Need extra support?

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

Learn More

Forum Channels