

If the loading still does take some perceptible amount of time (e.g. It might very well be fine to only show the last hundred rows without filters, for example, and only giving access to the rest with a filter.Īpplying those ideas, you should be able to get away with having to use a loading animation at all. You might want to consider adding some filters that align well with the requirements of your customers. In most cases, you don't really want to work with a grid with millions of rows, virtual or not.

See (v=vs.110).aspx for more information. The default winforms DataGridView is in fact designed to deal with this - you just have to enable virtual mode, and write a bit of code. For anything more, you really need some way of partitioning the data to avoid always presenting everything. For a few hundred rows, binding it directly to the grid is fine. Second, figure out how to present the data. NET, grids are not virtual by default, so data binding millions of rows is always a terrible idea.įirst, figure out how much data you really need to get at a time - maybe loading everything at once (but separately from the data binding) is a good option, maybe you want to read data on-demand. It sounds like you're coming from Delphi / FoxPro background. ListViewItem listitem = new ListViewItem(dr.ToString()) SqlDataAdapter adp = new SqlDataAdapter(queryString, conn) SqlCommand cmd = new SqlCommand(queryString, conn) Using (SqlConnection conn = new SqlConnection(connectString)) string queryString = "select scanby,count(distinct refno),count(1) from SecRec where scan='Y' and convert(varchar(10),ScanTime,111) like '" + comboDate + "' group by scanby order by 3,2 desc" Is this the only way to achieve this, Please direct me in the right direction.

I tried using threading and background worker but updating multiple controls like list view and labels on the master GUI doesn't look feasible. I want to show an animated GIF in picture box while the loading is being done in the background. I am using multiple stored procedures to update the list view and labels. The database contains millions of scanning records. I have used multiple list-views and labels to display this details successfully. The supervisors have form named dashboard in the application where they can check multiple count details like scanning done by each user, daily scan count, hourly scan count, product scan count etc. Developed a small windows MDI application in C# where multiple users update and scan product bar codes before dispatching.
