On Mon, Nov 21, 2011 at 8:54 AM, Rich <richard_lat...@hotmail.com> wrote:
> Hello All,
>
> I've got a Windows Form based application with a movable panel and a
> DataGridView component installed.
>
> I used the datagridview to view, modify and save .csv and exel
> files.
>
> Using files with less than a 1000 records seems work okay and the
> component is quite responsive.  However, if I load files with excess
> of 5000 records it then becomes slow and non responsive.  With tables
> with rows 40000, it becomes totally unusable.  The data file itself is
> loaded into a DataTable component and I use this as the DataSource for
> the control.
>
> I should also say that I have two events attached to the
> dataGridView.  One that updates another component on selection change
> and another that opens another dialog when you double click on a row.
>
> I also have other functions that update the dataGridView which finds
> and updates duplicate data rows using the Select filter statement.
> The performance of this appears to be adequate.
>
> From searching around on google the problem appears to be that every
> time you update a row e.g. add, remove or modify a row it updates the
> entire table.
>
> For example:
>
> If you have a small table with say 500 rows with 15 columns there are
> indvidually 7,500 events that are updated and in a modern Windows
> based system is not really a problem.   However, if you have a table
> with 40,000 records and 15 columns then each time it raises 60,000
> events each time you modify a row or cell.
>
> So I guess it's a case of preventing the events from being raised, but
> I also don't want to stop the double click event on a row from taking
> place.
>
> I've read other postings whereby improve the performance by using a
> bindingsource however experimenting with this hasn't really made much
> of an improvement.
>
> Can anyone help me in improving the performance of a dataGridView
> please?
------------------------

If you are using a sproc to pull the data why not add this line to the top?

 Set rowcount 1000

You are abusing the datagrid object in the volume you are pushing into
it.  I see you taking a hand truck thinking that you can move a few
boxes that weigh 2000 pounds.

-- 
Stephen Russell

901.246-0159 cell

-- 
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to dotnetdevelopment@googlegroups.com
To unsubscribe from this group, send email to
dotnetdevelopment+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net

Reply via email to