I am getting very strange problem with data pager. If I am trying to set pagesize more than total number of records then it goes in process. Aquire 50% of CPU and memory. Browser stop responding.
Details:
I am binding grid with IEnumerable result. XAML code is as below for pager and grid.
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Display:" Style="{StaticResource TextBlockStyle}"/>
<TextBox x:Name="txtPageSize" Style="{StaticResource PageSizeTextBoxStyle}" Text="10" />
<Button x:Name="btnPageSize" Background="Transparent" Click="btnPageSize_Click" BorderBrush="{x:Null}">
<Button.Content>
<Image Source="../Images/refresh.png" />
</Button.Content>
</Button>
<grid:RadDataPager x:Name="RadPagerData" Margin="3" PageSize="10" DisplayMode="All" IsTotalItemCountFixed="True"/>
</StackPanel>
<grid:RadGridView x:Name="xtRadGridView" ItemsSource="{Binding PagedSource, ElementName=RadPagerData}"
DataLoaded="xtRadGridView_DataLoaded" HorizontalAlignment="Left" Style="{StaticResource GridViewStyle}"
AutoGenerateColumns="True" ShowColumnFooters="True"/>
</StackPanel>
Textbox "txtPageSize" is to define size of the page. Button click refresh the page with size defined in textbox.
In Code behind I set Source property of DataPager.
//Grid Bindings
RadPagerData.Source =
null;
//_viewModel.Result is type of IEnumerable and loaded dynamically....
RadPagerData.Source = _viewModel.Result;
example:
_viewModel.Result has 20 records. Initial pagesize is 10.
if i set page size to anything less than 20 it works fine. Paging and grid....
if i set page size to anything greater than or equals to 20 then it fails....
I also have aggregatefunctions on grid, which counts aggregate values on "xtRadGridView_DataLoaded" event...
please respond soon.... thanks.