Re: Speed up datagrid rendering
- From: Peder Y <pedery@xxxxxxxxxxx>
- Date: Thu, 07 Apr 2005 17:27:49 +0200
Thanks Alex!
I'll try using a different thread, then. However, since the initial rendering of the controls is the problem, I have some doubts this will solve the problem.
Imagine for instance that you have a form with two panels separated by a splitter. One of them is DockStyle.Fill, the other Top or Bottom.
Then in both these Panels, you have a DataGrid set to DockStyle.Fill.
On a toolbar, you have two CheckBoxes setting the visibility of the Panels (and the Splitter)
If you load the grids with some data, and try to check or uncheck the CheckBoxes, you will have a very short pause as things are being reordered, and a microscopic flicker. This is what I'm trying to eliminate. It's not a very big deal, but I feel it's like a small touch that's needed to make an application look professional.
- Peder -
Alex Passos wrote:
Have you tried to do the processing on a separate thread so that your main UI thread won't lock up. I did this on a project and its not something that is trivial because DataGrid is not a thread safe component so great care goes into controlling the concurrency. In my project it loaded thousands upon thousands of rows so I controlled it using the viewable area and fetch the database rows necessary when needed also allowing for a small foot print of the recordset.
Also for a small amount of rows like that you might want to look into DataGrid.SuspendLayout and DataGrid.ResumeLayout so you can suspend it, load the data, then resume that might help you some.
Alex
"Peder Y" <pedery@xxxxxxxxxxx> wrote in message news:eZ1j%23o3OFHA.3076@xxxxxxxxxxxxxxxxxxxxxxx
Nope, I just have a few rows of data. Time will show if an approach like the one you describe will be necessary, but for the time being I'm merely interested in a faster way to load a datagrid. Maybe it's because I use a lot of ColumnStyles (around 15 in each grid)?
- P -
.
- References:
- Speed up datagrid rendering
- From: Peder Y
- Re: Speed up datagrid rendering
- From: Alex Passos
- Re: Speed up datagrid rendering
- From: Peder Y
- Re: Speed up datagrid rendering
- From: Alex Passos
- Speed up datagrid rendering
- Prev by Date: Re: Speed up datagrid rendering
- Next by Date: Re: Managing client-side security for .NET UserControl under IE
- Previous by thread: Re: Speed up datagrid rendering
- Next by thread: Help: How to remove cursor from Rich Text Box(RTB)
- Index(es):
Relevant Pages
|
Loading