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

Automatic EditMode for a checkbox Column

2 Answers 186 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 07 Jun 2010, 10:37 AM

Hi,

I'm using RadControls for WPF 2010 Q1 (V2010.1.528.35). I have to customize the RadGridView according the following points :

  • the grid needs to define a first column that is a checkbox column allowing to select/deselect rows
  • this column is databound (2way) to a boolean property (IsSelected) of an object.
  • the column must be always in edit mode. The user needs to be allowed to check directly the checkboxes without a previous click/double click that put the cells in editmode.

The first 2 points are done without any problem. For the third, I've tried differents ways to achieve this goal but without success :/

Can someone provide me a little help on this point ?

Greets,

Thomas

2 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 07 Jun 2010, 01:04 PM
Hi Thomas,

RadGridView supports a specific type of column - GridViewSelectColumn that offers the functionality of selecting rows through check-boxes. It can be defined in xaml in the following way:

<telerik:GridViewSelectColumn Header="Select Row"/>

You can find more information about selection in RadGridView in our online documentation.
In case that functionality does not cover exactly your requirements, please do not hesitate to get back to us.

Kind regards,
Maya
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.
0
Thomas
Top achievements
Rank 1
answered on 07 Jun 2010, 01:46 PM
Hi Maya,

Thank you for your fast reply.
I noticed the existance of the GridViewSelectColumn but its disadvantage (if I read well) is that it cannot be bound to a bool property of an object like the GridViewCheckBoxColumn does. I confess that I did'nt tried to adapt my model to the GridViewSelectColumn functionnality and thus, work without binding functionnality for selection.
Up to now, I only tried to adapt the GridViewCheckBoxColumn in order to making it always editable (by playing with the EditMode property of the cells) while keeping two-way binding functionnality. But I faced some problems with the asynchronous mode and this solution wasn't really elegant.

Maybe, I should better try to use the GridViewSelectColumn like you said and replacing the binding by another logic.
I will try this path and provide some feedback.

Thank you for your help,

Thomas
Tags
GridView
Asked by
Thomas
Top achievements
Rank 1
Answers by
Maya
Telerik team
Thomas
Top achievements
Rank 1
Share this question
or