Search code examples
devexpressxtragrid

How do I populate an XtraGrid dynamically?


I have a grid that needs to show data from a large table. I don't want to load the whole table at once as that will be hard on memory. I'm aware that there is a virtual load on server mode but I'm loading from a local csv file and not using any sql server databases.

Are there any such methods for virtual loading to support custom data access objects so I can just grab data from my csv when the user scrolls down on the grid?

Any help much appreciated.


Solution

  • I don't believe any such thing exists. However, it's possible to roll your own by implementing the DevExpress.Data.IListServer interface. From what I've read on the subject, it doesn't appear to be a trivial task. These links might get you started.

    Simple IListServer implementation

    Does the XtraGrid support Virtual Load mode?

    One alternative might be to import your csv data into a SQLite database. Then you could use a LinqServerModeSource as your data source. The following link provides details on how you might do that.

    SQLite and Server Mode

    Hope this helps.