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

RadTreeVews + RadDataPagers in TabControl

0 Answers 24 Views
DataPager
This is a migrated thread and some comments may be shown as answers.
Rumyantsev
Top achievements
Rank 1
Rumyantsev asked on 21 Oct 2019, 03:08 PM

I have the TabControl with any TabPages. Each page has TreeView with with several thousand nodes + DataPager. All TabPages have identical XAML and ViewModel. An exception occurs when I switch between pages (incorrect arguments RadDataPager.PageSize and RadDataPager.PageIndex). If  TreeView on selecting TabPage is empty exeption not occurs.

Fragment my XAML :

...

<telerik:RadDataPager x:Name="xDataPager" Grid.Column="2" Margin="10,0,10,0"
PageSize="{Binding Value, ElementName=ndCount,Mode=TwoWay,UpdateSourceTrigger=Explicit}" FontSize="12"
BorderThickness="1,0,1,1" DisplayMode="All"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Center"
Source="{Binding ObjectList,Mode=TwoWay,NotifyOnSourceUpdated=True,UpdateSourceTrigger=PropertyChanged}"
PageIndex="{Binding ActualPage, Mode=TwoWay, UpdateSourceTrigger=Explicit}"
IsTotalItemCountFixed="false" >
<telerik:EventToCommandBehavior.EventBindings>
<telerik:EventBinding Command="{Binding PageChangedCommand}" EventName="PageIndexChanged" RaiseOnHandledEvents="False" PassEventArgsToCommand="True" />
<telerik:EventBinding Command="{Binding PageChangingCommand}" EventName="PageIndexChanging" RaiseOnHandledEvents="False" PassEventArgsToCommand="True" />
</telerik:EventToCommandBehavior.EventBindings>
</telerik:RadDataPager>
<StackPanel Orientation="Horizontal" Grid.Column="3" VerticalAlignment="Center" Margin="10,0,10,0">
<TextBlock Text="Объектов на странице :" FontSize="12" VerticalAlignment="Center" />
<telerik:RadNumericUpDown x:Name="ndCount" IsInteger="True" ValueFormat="Numeric" Value="{Binding PageSize, Mode=TwoWay,UpdateSourceTrigger=Explicit,NotifyOnValidationError=True}" Minimum="10" Maximum="200" SmallChange="5" LargeChange="10" VerticalAlignment="Center" Margin="5,0,10,0"/>
</StackPanel> <telerik:RadDataPager x:Name="xDataPager" Grid.Column="2" Margin="10,0,10,0"
PageSize="{Binding Value, ElementName=ndCount,Mode=TwoWay,UpdateSourceTrigger=Explicit}" FontSize="12"
BorderThickness="1,0,1,1" DisplayMode="All"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Center"
Source="{Binding ObjectList,Mode=TwoWay,NotifyOnSourceUpdated=True,UpdateSourceTrigger=PropertyChanged}"
PageIndex="{Binding ActualPage, Mode=TwoWay, UpdateSourceTrigger=Explicit}"
IsTotalItemCountFixed="false" >
<telerik:EventToCommandBehavior.EventBindings>
<telerik:EventBinding Command="{Binding PageChangedCommand}" EventName="PageIndexChanged" RaiseOnHandledEvents="False" PassEventArgsToCommand="True" />
<telerik:EventBinding Command="{Binding PageChangingCommand}" EventName="PageIndexChanging" RaiseOnHandledEvents="False" PassEventArgsToCommand="True" />
</telerik:EventToCommandBehavior.EventBindings>
</telerik:RadDataPager>
<StackPanel Orientation="Horizontal" Grid.Column="3" VerticalAlignment="Center" Margin="10,0,10,0">
<TextBlock Text="Objects on page:" FontSize="12" VerticalAlignment="Center" />
<telerik:RadNumericUpDown x:Name="ndCount" IsInteger="True" ValueFormat="Numeric" Value="{Binding PageSize, Mode=TwoWay,UpdateSourceTrigger=Explicit,NotifyOnValidationError=True}" Minimum="10" Maximum="200" SmallChange="5" LargeChange="10" VerticalAlignment="Center" Margin="5,0,10,0"/>
</StackPanel>

...

 

No answers yet. Maybe you can help?

Tags
DataPager
Asked by
Rumyantsev
Top achievements
Rank 1
Share this question
or