Hi Sherlock,
Your requirement to notify PageIndex property changes reflection in SfDataPager
can be achieved by setting Mode as TwoWay for PageIndex property and
implementing the INotifyPropertyChanged. Refer to the below code snippet,
XAML Code snippet:
|
<syncfusion:SfDataPager x:Name="dataPager" Grid.Row="1"
PageSize="5"
Source="{Binding Orders}"
PageIndex="{Binding
PageIndex,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
/>
|
C# Code snippet:
|
public class ViewModel :
INotifyPropertyChanged
{
private int
_pageIndex=1;
public int
PageIndex
{
get { return _pageIndex; }
set
{
if (_pageIndex
!= value)
{
_pageIndex = value;
OnPropertyChanged("PageIndex");
}
}
}
}
|
Find the sample demo in the attachment.
Regards,
Vijayarasan S
If this post is helpful, please consider Accepting it as the solution so that
other members can locate it more quickly.
Attachment:
Sample_8a1b8d6f.zip