Large dataset and winforms

I have a dataset that is about 3 million records and I would like to load them into a Data Grid in an application (WinForm).

What is the best approach / method to display the data.

I need to be able to run a filter on data to shrink my dataset, ideas would be welcome

+1


a source to share


3 answers


It is a good idea to filter the data in the database and only get the result set of (pre) filters. If this set is still large, use virtual mode , but also rethink your design - if you want to display as much data as you get in performance issues, you can also display a lot of data to the user.



+1


a source


In addition to filtering, you should also consider paging to the backend (your SP must handle paging)



0


a source


You can bind a grid to a DataSet using the DataSource property and the BindingSource component. The form designer can take care of creating the BindingSource for you. BindingSource has a Filter property that lets you filter the content of the DataSet

EDIT: By the way, in data binding mode the DataGridView implicitly uses virtual mode, so you don't need to worry about too many rows in the grid

0


a source







All Articles