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

CheckBox in GridView (need to be able to check it)

5 Answers 66 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Marcelo
Top achievements
Rank 1
Marcelo asked on 07 Mar 2012, 04:20 PM
Hello. I have added a CheckBox to a GridView. I need to be able to check and un-check this CheckBox w/o editing the row. I have seen examples where the CheckBox is checked when the row is clicked but this is not what I am after.

Thanks in advance.

5 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 07 Mar 2012, 04:36 PM
Hello,

 Do you mean that you want to check and uncheck the CheckBox with a single click on it?

Greetings,
Didie
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Marcelo
Top achievements
Rank 1
answered on 07 Mar 2012, 04:39 PM
Hello Didie. Yes, would like to have just the CheckBox "open" (editable) so the users can check and un-check it with a single click.
0
Accepted
Dimitrina
Telerik team
answered on 08 Mar 2012, 09:00 AM
Hi,

There are two approaches to achieve this. Please refer to this help article for further information.

All the best,
Didie
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Marcelo
Top achievements
Rank 1
answered on 08 Mar 2012, 01:39 PM
Hello Didie and thank you. That's what I needed. In fact, I did some testing on all the options I found and wanetd to share the following:

I have tried

  1. GridViewSelection,
  2. GridViewCheckBoxColumn,
  3. GridViewDataColumn with a regular CheckBox within the DataTemplate


My findings (just with the XAML code) below...

  1. The Check Box gets checked when you click anywhere in the row (including the check box itself). To un-check it, you need to click on the Check Box. This option allows you to select multiple rows if you click on the Check Box itself or select only one row if you click anywhere on the row. Know that if you have checked multiple Check Boxes (by clicking on the Check Box) and then you selecet anywhere on a row, all your previous selections are gone and the Check Box in the row clicked is checked
  2. The Check Box gets checked with two clicks on the Check Box and to un-check it only one click is needed. This option allows you to select only one row at the time. Know that if you check a Check Box and then click anywhere else, the Check Box gets un-checked
  3. The Check Box gets checked with one click and un-checked with one click. This option allows you to select multiple rows and clicking on the row does not check or un-check the Check Box




0
Dimitrina
Telerik team
answered on 08 Mar 2012, 02:18 PM
Hello,

 Thank you for that additional information.

Kind regards,
Didie
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
GridView
Asked by
Marcelo
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Marcelo
Top achievements
Rank 1
Share this question
or