Hi,
I have an application on which I use XamDataGrid, and I bind to grid some collection of objects. I have one column where is checkbox because it should represent boolean type. When I click on checkbox to change state of it, data in collection aren't changed until I move to next row. I think data should be updated every time when checkbox will change state so what I should to do to change this behavior?
Regards
Pokrec
Hello,
I am having same issue. And I did not fully understand what we should do to resolve the issue.
In my case, changing Boolean field in UI does not get reflected in collection at all no matter where you click after that.
Please help!
Thanks & Regards,
Priya
I was looking for solution to same issue and the above solution did not work.
I am using 10.2 ver. Below is my code.
Am i doing some thing wrong here?
<Style x:Key="IGCheckboxColumn" TargetType="{x:Type igDP:CellValuePresenter}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}"> <CheckBox HorizontalAlignment="Center" VerticalAlignment="Center" IsChecked="{Binding Path=Value, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" /> </ControlTemplate> </Setter.Value> </Setter></Style>
<igDP:Field Name="TradeSelector"> <igDP:Field.Settings> <igDP:FieldSettings CellMaxWidth="40" CellValuePresenterStyle="{StaticResource IGCheckboxColumn}" /> </igDP:Field.Settings> </igDP:Field>
Thanks
Hello Pokrec,
I am just checking if my last reply was helpful for you.
If you require any further assistance please do not hesitate to ask.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics, Inc.
www.infragistics.com/support
OK thanks for your help, I will try to do this by re-templating CellValuePresenter
When you are using our XamCheckEditor to display and edit Boolean data in a XamDataGrid Field the data in the collection does not updates immediately when you change the state of the XamCheckEditor because the editor goes in edit mode. The underlying data updates its value when the cell exits edit mode and that seems to be the reason for the behavior that you described. If a CellValuePresenter is re-templated in order to have a CheckBox in its ControlTemplate and the CheckBox’s IsChecked property is bound to CellValuePresenter’s Value, the data in the collections is updated immediately when the CheckBox changes its state.
Infragistics