Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1070
How to bind to the PageSize property of the PagerSettings for an XamGrid
posted

I have the following XAML snippet.

<igDock:ContentPane x:Class="...."
                    ....
                    xmlns:ig=”http://schemas.infragistics.com/xaml”
                    Header=”{Binding Name}”>

  <ig:XamGrid ItemsSource=”{Binding DataTable}” ...>
    <ig:XamGrid.PagerSettings>
      <ig:PagerSettings AllowPaging=”Bottom” PageSize=”{Binding MaxRecordCount}” />
    </ig:XamGrid.PagerSettings>
  </ig:XamGrid>
</igDock:ContentPane>

This XAML snippet shows three binding. One for the Header of the ContentPane, a second for the ItemsSource of the XamGrid and a third for the PageSize of the PagerSettings. The Binding for the Header and ItemsSource work fine but the Binding for the PageSize does not. I see the following Binding Error in the Output window.

System.Windows.Data Error: 2 : Cannot find governing FrameworkElement for FrameworkContentElement for target element. BindingExpression:Path=MaxRecordCount; DataItem=null; target element is ‘PagerSettings’ (HashCode=xxxxxxxxx); target property is ‘PageSize’ (type ‘Int32’)

I have the correct properties in my ViewModel and they are correctly using the NotifyPropertyChanged events.

Can anyone tell me how to correct this Binding Error?