I have 74 columns in my grid view which a user can choose to view or not using the column chooser.
On first bind of the grid it leaves about 10 of these visible but makes the rest invisible, this is making the startup of my windows app incredibly slow.., to the point that it sometimes crashes..
I know 74 is a huge amount, but this is a business requirement to give the users the option.
Is there anyway of doing this using the grid view and column chooser without it being so incredibly slow, or do you have any suggestions of another method I can use?
Thanks
Becky
14 Answers, 1 is accepted
Is it slow with only a few records displaying? I mean, is the grid having issues managing 75 columns, or is it having issues displaying 1,000 records with 75 columns?
Yes it is very slow even when binding an empty grid.
I have found something that is making it considerably quicker
radGridView1.GridElement.BeginUpdate();
.........
radGridView1.GridElement.EndUpdate();
Its not as quick as I would like, but its definitly usable but if this doesn't work, I will have to do as you suggested above.
Thanks
Bex
We are glad to hear that you found a resolution.
Currently the best solution we can offer is to use the BeginUpdate .. EndUpdate construction.
This situation is not acceptable and the problem is in our TODO list with high priority. We will provide a solution for that as soon as possible.
In case you need further assistance, we will be glad to help you.
Regards,
Jack
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Would you post back to this thread when there is a "proper" fix available?
Thanks
Bex
Yes, we will keep you informed on the progress with this issue.
Greetings,
Jack
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Unfortunately, we could not implement this feature in time for the Q3 release. Improving the speed of RadGridView is one of our top priorities. In the beginning of next year we will present a greatly improved version of RadGridView featuring much better performance. We will do our best in order to implement the requested feature in this release.
Please, take a look at the Q3 release. Your feedback would be greatly appreciated.
Greetings,
Jack
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I did some timing testing since I was having much the same problem,
and here is the information I got if it is any help:
First I set the old datasource to null and create an empty table. Then I
import rows from a datasource into my temporary table based on some rules,
then I set the grids datasource to the temporary table, set the columns
visible or not and fixes the header text for the columns.
There is (at the moment) no code for ordering the columns.
The table has 25 columns, and I import 17,467 rows into the temporary table.
---
Without Begin/end update:
Suspended layout (00:00:00)
Cleared datasource and created empty table (00:00:00)
Imported all rows (00:00:00.9843813)
Sat datasource (00:00:01.2968833)
Fixes column visibility and header text (00:00:06.2969217)
Ordered column (00:00:00)
Resumed layout (00:00:00)
Total time (00:00:08.5781863)
---
With begin/end update :
Suspended layout (00:00:00)
Cleared datasource and created empty table (00:00:00)
Imported all rows (00:00:00.9687562)
Sat datasource (00:00:01.3281335)
Fixes column visibility and header text (00:00:00.2031263)
Ordered column (00:00:00)
Resumed layout (00:00:00)
Total time (00:00:02.5000160)
---
As you can see, the time consuming bit was setting the columns visible
and setting the header text. The BeginUpdate/EndUpdate seems to have
removed this bottleneck. However, I thought the SuspendLayout/ResumeLayout
should have worked so it won't update when you are changing the layout, in
this case the visibility of the colunms. So that sort of confused me until I
read this thread and saw the begin/end thing.
Thank you for the detailed research.
Currently, we are working on a new version of RadGridView which will deliver increased speed and a reduced memory footprint. For the time being, we recommend using the BeginUpdate/EndUpdate whenever more than one visual property in RadGridView is changed.
Don't hesitate to contact us if you have further questions.
Greetings,
Jack
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Can you tell me, please, if this feature was implemented for the latest version?
Thank you!
This is a very old thread, the performance (and stability) of RadGridView has improved quite a bit in the last 3 years.
Regards
Erwin
I routinely have 50+ columns on grids (most of them initially invisible) with no noticeable lag.
Of course, you should make columns visible/invisible before
the grid initially displays and/or within BeginUpdate() / EndUpdate() or DeferRefresh()
Personally I prefer the
using
(mygrid.DeferRefresh())
{
// do the stuff that potentially causes screen updates here
}
because it can be tricky to call EndUdate() on all code paths.
RadGridView uses UI virtualization and it creates visual elements only for the cells that are currently visible. That is why the row and column number is not relevant to its performance in general. It looks that there is something specific in your application which causes the delay. Please, could you open a support ticket and send us your application. We will investigate the case in detail and we will try to find the best option.
I am looking forward to your project.
All the best,
Jack
the Telerik team