This question is locked. New answers and comments are not allowed.
Hi,
Currently I'm strugling a bit with a RadGridView that contains a lot of CheckBox columns, right now the user has to click at least two times to check a checkbox. I'd like to have a behavior like the GridViewSelectColumn (that means, one click is a check).
Anyone can help me with this?
Thanks in advance.
Ernstjan
Currently I'm strugling a bit with a RadGridView that contains a lot of CheckBox columns, right now the user has to click at least two times to check a checkbox. I'd like to have a behavior like the GridViewSelectColumn (that means, one click is a check).
Anyone can help me with this?
Thanks in advance.
Ernstjan
4 Answers, 1 is accepted
0
Hello Ernstjan,
Maya
the Telerik team
You may try to set the IsReadOnly property of the column to "True".
Maya
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Ernstjan
Top achievements
Rank 1
answered on 17 Jan 2011, 01:02 PM
Hello Maya,
Thanks for your quick reply. I tried to set the checkboxcolumns to IsReadOnly="True", but now I cannot check the checkbox anymore.
Am I missing something?
Thanks for your quick reply. I tried to set the checkboxcolumns to IsReadOnly="True", but now I cannot check the checkbox anymore.
Am I missing something?
0
Accepted
Hi Ernstjan,
In this case you will need a click for putting the cell into edit mode and a second one for checking the CheckBox.
Another possible approach would be to use a GridViewDataColumn and define its CellTemplate as a CheckBox. In this way, however, will will bypass the built-in validation and you will need to handle it on your own:
Regards,
Maya
the Telerik team
Please excuse me for the misunderstanding. If you want to use the GridViewCheckBoxColumn, you may define its properties EditTriggers to "CellClick" and AutoSelectOnEdit to "True":
<telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding IsPlaying,Mode=TwoWay}"
EditTriggers="CellClick" AutoSelectOnEdit="True"/>In this case you will need a click for putting the cell into edit mode and a second one for checking the CheckBox.
Another possible approach would be to use a GridViewDataColumn and define its CellTemplate as a CheckBox. In this way, however, will will bypass the built-in validation and you will need to handle it on your own:
<telerik:GridViewDataColumn> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <CheckBox IsChecked="{Binding IsPlaying,Mode=TwoWay}" /> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>Regards,
Maya
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Ernstjan
Top achievements
Rank 1
answered on 17 Jan 2011, 02:27 PM
I used the CellTemplate approach and it does exactly what I want :)
Thanks a lot!
Thanks a lot!