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
2690
Xamgrid Templatecolumn(combo) based on value of the property given to the checkboxcontrol
posted

Hello

I have create property

 public Boolean IsComboEnabled
        {
            get
            {          
                Boolean field1= true;
                if (null!=this.field2)
                {
                    field1= false;
                }
                return field1;
            }
           
        }

In the xaml I have <ig:CheckBoxColumn x:Name="xxxCheckbox" HeaderText="xxx" Key="IsComboEnabled"></ig:CheckBoxColumn>

I want the combo in Templatecolumn to change based on whether the checkbox is slected or deselected

I have set the value of combo in template column as

  IsEnabled="{Binding IsComboEnabled,Mode=TwoWay}"

 

But it does only work for the first time page is loaded not when the user is on page and selects or deselects the combo

 

 

Parents
  • 21382
    Suggested Answer
    posted

    I don't think that code snippet is going to do what you want it to do

     

    The IsComboEnabled property is is read only.  Which fine, but then you really don't need a checkbox column as it's not going to change it's value if you check it.  

    And you are setting a TwoWay binding between the IsComboEnabled property and the combo IsEnabled.  Are you planning on changing the combo's property and having the object's IsComboEnabled changing?

     

    I am attaching a sample showing a possible partial solution.

     

     

Reply Children