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
70
How to update bound property for checkbox column without needing to click outside cell?
posted

How to update bound property for checkbox column without needing to click outside cell?

I have a XamDatagrid with only one fields editable, which is a checkbox used for selecting items. When I change the value, the underlying bound property is not being updated until I click outside the cell. I tried playing with the grid's UpdateMode property but of no use.

This is very important as user click on the checkbox, they see it as the row is selected but when they perform an operation "Say delete", from the ribbon, which is supposed to delete the row.. is not being deleted. I tried to explain to users how it works.. but .. you know they are users.

Any help in this direction is appreciated.

thanks

Bhuvan

Parents
No Data
Reply
  • 385
    posted

    One of the posts suggested that you change the template to use a regular check box instead of the XamCheckBoxEditor:

    <

     

    ig:Field Name="SomeBooleanField" >

    <ig:Field.Settings>

    <

     

    ig:FieldSettings>

    <

     

    ig:FieldSettings.CellValuePresenterStyle>

    <Style TargetType="{x:Type ig:CellValuePresenter}">

     <

     

    Setter Property="Template">

    <

     

    Setter.Value>

    <

     

    ControlTemplate>

    <

     

    CheckBox HorizontalAlignment="Center" VerticalAlignment="Center"

    IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content}"/>

     

    </

     

    ControlTemplate>

    </Setter.Value>

    </Setter>

     

    </

     

    Style >

    </

     

    ig:FieldSettings.CellValuePresenterStyle

    </

     

    ig:FieldSettings>

    </ig:Field.Settings>

    </ig:Field>

     

     

Children
No Data