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

[Solved] How can we catch the cell click event ?

1 Answer 184 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rejish Rajan
Top achievements
Rank 1
Rejish Rajan asked on 27 Feb 2010, 03:18 PM
hi,

I have boolean property in my Class, when i am binding the Grid itemsource with the generic list, the boolean property is show as a checkbox column. But inorder to check or uncheck the cell , i need to do 3 clicks, first to select the row and then to select the cell (in to edit mode) and then third click to check or uncheck the cell value.

how can i perform the cell check or uncheck in one click?
Is there a method to catch the cell click event, so that i can modify the datasource ( boolean property ) the column cell is asociated with.


Thanks & Regards
Rejish.

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 01 Mar 2010, 07:28 AM
Hi Rejish,

You can define (and two-way bind) CheckBox using CellTemplate of the column. Here is an example:

<telerikGrid:RadGridView ItemsSource="{Binding}" AutoGenerateColumns="False">
            <telerikGrid:RadGridView.Columns>
                <telerikGrid:GridViewDataColumn IsReadOnly="True" DataMemberBinding="{Binding MyProperty}">
                    <telerikGrid:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding MyProperty, Mode=TwoWay}"/>
                        </DataTemplate>
                    </telerikGrid:GridViewDataColumn.CellTemplate>
                </telerikGrid:GridViewDataColumn>
            </telerikGrid:RadGridView.Columns>
        </telerikGrid:RadGridView>

Regards,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Rejish Rajan
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or