This is a migrated thread and some comments may be shown as answers.

GridViewCheckBoxColumn biding isn't updated on PropertyChanged

3 Answers 392 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Roee
Top achievements
Rank 1
Roee asked on 14 Mar 2011, 03:33 PM
Hello All.

I've a GridView with a checkbox column 

<telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger= PropertyChanged}" .../>


Now it seems the binding is updated only on lost focus (for example, when clicking on another cell/row) and not according to the UpdateSourceTrigger= PropertyChanged.

This is a problem for me, since I've a menu bar which has commands (like delete) which work on the selected rows, and when the menu item is clicked, the Checkbox binding isn't yet updated. Basically you have to select the checkbox, click on the grid outside the checkbox, and only then click on the menu item.Is there indeed a problem here, or am I doing something wrong? Should I simply use GridViewDataColumn with checkbox instead of GridViewCheckBoxColumn?

Yours,
Roee



3 Answers, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 14 Mar 2011, 03:37 PM
Hello Roee,

May you take a look at this forum thread for a reference and let me know whether it corresponds to your requirements ?
 

Kind regards,
Maya
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Ronnie
Top achievements
Rank 1
answered on 25 Nov 2019, 04:39 PM

I have the following code which uses a boolean type converter and your solution isn't updating the value directly without losing focus.

Can you please help?

<telerik:GridViewDataColumn Header="Status" <br>
                                            DataMemberBinding="{Binding IsActive,Converter={StaticResource ActiveInactiveBooleanConverter}}" IsReadOnly="True"><br>
                    <telerik:GridViewDataColumn.CellTemplate><br>
                        <DataTemplate><br>
                            <CheckBox IsChecked="{Binding IsActive, Mode=TwoWay}"<br>
                                      telerik:StyleManager.Theme="Office_Black"></CheckBox><br>
                        </DataTemplate><br>
                    </telerik:GridViewDataColumn.CellTemplate><br>
                </telerik:GridViewDataColumn>
0
Dilyan Traykov
Telerik team
answered on 28 Nov 2019, 10:21 AM

Hello Ronnie,

Thank you for the provided code snippet.

I tried replicating a similar setup in a small sample project but the value of the IsActive property is directly updated at my end.

Could you please have a look at the attached project and let me know if I'm missing something of importance?

Regards,
Dilyan Traykov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Roee
Top achievements
Rank 1
Answers by
Maya
Telerik team
Ronnie
Top achievements
Rank 1
Dilyan Traykov
Telerik team
Share this question
or