Hello Telerik Team,
I have one more stupid question about GridView component. Our application have a main window with menu toolbar and frame which is filled by some content (page with gridview) which is selected by some button or menu item. When I click on the button (menu item), I would like to show my data grid in content frame, however grid loading time seems to me quite long. First, i thought it is caused by cell templates/metro style/disabled virtualization/placing into grid without fixed size ... , but then a make a simplification and application behaves exactly the same. It means, that I have approximatelly at least 2-3s data grid loading time after click on the button even if I display only few records (about 3 columns and 40 rows). It can be quite annoying for our users, thus i would like to ask You, if there is some technique to decrease this loading time or You can identify some fault I made in the code??? I made a simplification of our project, but because i cannot attach compressed source codes, i try to add some code in this post. It seems to me, that i have used all possible actions described in your "performance guide" or those described in forums (default theme, no cell templates, virtualization, fixed size, read only, simple binding, ...).
MainVindow.xaml
MainWindow.xaml.cs
Grid.xaml (grid page to be inserted)
Data are binded from MyViewModel.cs + Clubs.cs which is used in your examples (322627_RadGridView-WPF-AR-20).
I have one more stupid question about GridView component. Our application have a main window with menu toolbar and frame which is filled by some content (page with gridview) which is selected by some button or menu item. When I click on the button (menu item), I would like to show my data grid in content frame, however grid loading time seems to me quite long. First, i thought it is caused by cell templates/metro style/disabled virtualization/placing into grid without fixed size ... , but then a make a simplification and application behaves exactly the same. It means, that I have approximatelly at least 2-3s data grid loading time after click on the button even if I display only few records (about 3 columns and 40 rows). It can be quite annoying for our users, thus i would like to ask You, if there is some technique to decrease this loading time or You can identify some fault I made in the code??? I made a simplification of our project, but because i cannot attach compressed source codes, i try to add some code in this post. It seems to me, that i have used all possible actions described in your "performance guide" or those described in forums (default theme, no cell templates, virtualization, fixed size, read only, simple binding, ...).
MainVindow.xaml
<Window x:Class=
"SimpleGrid.MainWindow"
Title=
"MainWindow"
Height=
"350"
Width=
"525"
>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height=
"25"
/>
<RowDefinition Height=
"280"
/>
</Grid.RowDefinitions>
<StackPanel Grid.Row=
"0"
>
<Button Content=
"Create grid"
x:Name=
"button1"
Grid.Row=
"0"
Click=
"button1_Click"
/>
</StackPanel>
<Frame x:Name=
"Frame1"
Background=
"Black"
Grid.Row=
"1"
Height=
"280"
Width=
"500"
/>
</Grid>
</Window>
MainWindow.xaml.cs
namespace
SimpleGrid
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public
partial
class
MainWindow : Window
{
public
MainWindow()
{
InitializeComponent();
}
private
void
button1_Click(
object
sender, RoutedEventArgs e)
{
Page p =
new
Grid();
this
.Frame1.Content = p;
}
}
}
Grid.xaml (grid page to be inserted)
<Page x:Class=
"SimpleGrid.Grid"
xmlns:telerik=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:my=
"clr-namespace:SimpleGrid"
mc:Ignorable=
"d"
d:DesignHeight=
"280"
d:DesignWidth=
"500"
Title=
"Grid"
>
<Page.Resources>
<my:MyViewModel x:Key=
"MyViewModel"
/>
</Page.Resources>
<Grid DataContext=
"{StaticResource MyViewModel}"
Height=
"280"
Width=
"500"
>
<telerik:RadGridView
Name=
"clubsGrid"
ItemsSource=
"{Binding Clubs}"
AutoGenerateColumns=
"False"
ShowGroupPanel=
"False"
IsReadOnly=
"True"
MaxHeight=
"280"
MaxWidth=
"500"
EnableColumnVirtualization=
"True"
EnableRowVirtualization=
"True"
CanUserFreezeColumns=
"False"
RowIndicatorVisibility=
"Collapsed"
CanUserResizeColumns=
"False"
>
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding=
"{Binding Name}"
Width=
"155"
IsGroupable=
"False"
IsFilterable=
"False"
IsSortable=
"False"
/>
<telerik:GridViewDataColumn DataMemberBinding=
"{Binding Established}"
Header=
"Est."
Width=
"180"
IsGroupable=
"False"
IsFilterable=
"False"
IsSortable=
"False"
/>
<telerik:GridViewDataColumn DataMemberBinding=
"{Binding StadiumCapacity}"
Header=
"Stadium"
Width=
"155"
IsGroupable=
"False"
IsFilterable=
"False"
IsSortable=
"False"
/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
</Grid>
</Page>
Data are binded from MyViewModel.cs + Clubs.cs which is used in your examples (322627_RadGridView-WPF-AR-20).