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

GridView's Header not DataBinding.

1 Answer 28 Views
GridView
This is a migrated thread and some comments may be shown as answers.
syed
Top achievements
Rank 1
syed asked on 21 May 2013, 07:36 AM
I am trying to have a checkbox int he header of the grid which will have descendents as checkbox helped to select rows and the checkbox in the header will be responsible for selecting all the rows at a time.

I want to raise an event or property changed when the select all checkbox is checked. This should be handled using MVVM.

The code is herein,

<telerik:GridViewColumn IsReadOnly="False" UniqueName="Select" IsVisible="True">
                                <telerik:GridViewColumn.Header>
                                    <CheckBox x:Name="chkSelectHeader"  />
                                     
                                </telerik:GridViewColumn.Header>

I have set the datacontext to the viewmodel class using DI Locator Class. The grid is having itemssource property set to a collection in the view model.

Please revert.

1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 24 May 2013, 07:54 AM
Hello,

Why not use GridViewSelectColumn (the built-in way for selection) and simply bind the grid selected items to your model? Please check this demo for more info.

Regards,
Yoan
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
syed
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Share this question
or