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
670
Binding on AllowAddNew
posted

Hi,

I want to dosomething like on XamDataGridFieldLayoutSettings :

AllowAddNew="{Binding MyBoolValue, Converter={StaticResource InvertBoolToBoolConverter}}"

but it's not work (it's work on IsEnabled property of an XamTextEditor on same user control)

An issue ? Thanks

 

 

 

Parents
  • 27093
    posted

    Hello,

    When binding a property from FieldLayoutSettings and FieldSettings collections the difference is that the properties are not in the visual tree and therefore need their source explicitly set like so:

    <igDP:XamDataGrid.FieldLayoutSettings >

        <igDP:FieldLayoutSettings AddNewRecordLocation="OnBottom" >

            <igDP:FieldLayoutSettings.AllowAddNew>

                <Binding Path="AllowAddNewProperty" Source="{StaticResource VM}" />

            </igDP:FieldLayoutSettings.AllowAddNew>                         

        </igDP:FieldLayoutSettings>

    </igDP:XamDataGrid.FieldLayoutSettings>

     

    In this case I have used a ViewModel approach intanciated like so:

     

        <Window.Resources>

            <local:MainViewModel x:Key="VM" />

        </Window.Resources>

     

     Hope this is what you needed.

     

    Sincerely,

    Petar Monov

    Developer Support Engineer

    Infragistics Bulgaria

    www.infragistics.com/support

     

Reply Children