This is a migrated thread and some comments may be shown as answers.

Performance problems when a RadGridView's inside a Popup?

5 Answers 155 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Robert Rossney
Top achievements
Rank 1
Robert Rossney asked on 07 Oct 2010, 01:19 AM
Ordinarily, if I hide/show an element containing a RadGridView, when I show it the first time, it takes around a half second to initialize, but when I show it a second time it appears almost instantaneously.

Unless I put it in a Popup, as I discovered when trying to implement a ComboBox-like UserControl.  Then it initializes every time the Popup is displayed.  The RadGridView in this example is bound to a collection containing three strings, and it takes about a half second to display every time I click on the ToggleButton:

        <DockPanel>
            <ToggleButton DockPanel.Dock="Top"
                            x:Name="Toggle">Show/Hide</ToggleButton>
                
            <Popup IsOpen="{Binding ElementName=Toggle, Path=IsChecked}"
                    Placement="Bottom">
                <Controls:RadGridView ItemsSource="{Binding Strings}"
                                        ShowGroupPanel="False"
                                        AutoGenerateColumns="False">
                    <Controls:RadGridView.Columns>
                        <Controls:GridViewDataColumn IsFilterable="False"
                                                        IsGroupable="False"
                                                        IsReadOnly="True"
                                                        SortingState="Ascending"
                                                        Header="String"
                                                        DataMemberBinding="{Binding}" />
                    </Controls:RadGridView.Columns>
                </Controls:RadGridView>
            </Popup>
        </DockPanel>

Is there something I can do to get around this?  I'd really like to avoid having to go back to using a ListView in my control.

Thanks,

Robert

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 08 Oct 2010, 03:37 PM
Hi Robert,

 You need to set Height for this Popup since in the current declaration the grid will be measured with infinity and will try to create all rows at once. No UI virtualization in this case. 

All the best,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Robert Rossney
Top achievements
Rank 1
answered on 08 Oct 2010, 07:17 PM
I'm already setting MaxHeight on the Popup.  Does the RadGridView still measure to infinity if MaxHeight is set?  If so, why?  If not, then what else might be causing this issue?
0
Vlad
Telerik team
answered on 11 Oct 2010, 09:34 AM
Hi,

 I've just tried this however everything worked fine on my end. You can check the attached application for reference. 

Best wishes,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kais
Top achievements
Rank 1
answered on 09 Mar 2011, 02:19 PM
Hi there, 

I've just tried to put a grid inside a popup and got a huge lag to show the popup. Around 2-10 seconds in some cases. Interestingly your sample doesnt hang (only the first open is a bit slow, after that no). 

I am looking but honestly can't see anything significantly different between the two usages. I'll dig deeper ... 
0
Kais
Top achievements
Rank 1
answered on 09 Mar 2011, 02:37 PM
Hi there, 

I've just tried to put a grid inside a popup and got a huge lag to show the popup. Around 2-10 seconds in some cases. Interestingly your sample doesnt hang (only the first open is a bit slow, after that no). 

I am looking but honestly can't see anything significantly different between the two usages. I'll dig deeper ... 
Tags
GridView
Asked by
Robert Rossney
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Robert Rossney
Top achievements
Rank 1
Kais
Top achievements
Rank 1
Share this question
or