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

GridViewSelectColumn - can I change it so that selecting the Row does NOT select the checkbox?

10 Answers 521 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Todd Davis
Top achievements
Rank 1
Todd Davis asked on 22 Mar 2010, 03:37 PM
I have a GridViewSelectColumn in my grid. If I click anywhere in the row, the checkbox selects. A nice feature I suppose, but it does not fit my needs, as it is leading to unintentionally selected rows (there are links/buttons in some columns that provide a feature, however clicking on these is also selecting the row). Is there a way to turn this "feature" off?

10 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 22 Mar 2010, 04:17 PM
Hi Todd Davis,

You could set the CanUserSelect property to false which will disable the UI selection (clicking on rows) but you will still be able to select rows by using the GridViewselectColumn. I am not sure if that covers all of your requirements but you could give it a try.


Greetings,
Milan
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
Sasireka
Top achievements
Rank 1
answered on 22 May 2013, 12:45 PM
Hi,

I need help of the below two requirements. Also pls provide whether it is possible to achieve in rad gridview.

I have one gridview which has three fields as checkbox column, Report name, Notes.  I have used GridviewSelectColumn for checkbox column.

Issues:

1. Uncheck the checkbox, then click on any other column of the gridview (like Report Name or Notes column), checkbox gets checked.
2. Checking/UnChecking the chekcbox selects and highlights entire row.

Please provide the steps for how to avoid these two issues.

Regards,
Sasi
0
Sasireka
Top achievements
Rank 1
answered on 22 May 2013, 12:45 PM
Hi,

I need help of the below two requirements. Also pls provide whether it is possible to achieve in rad gridview.

I have one gridview which has three fields as checkbox column, Report name, Notes.  I have used GridviewSelectColumn for checkbox column.

Issues:

1. Uncheck the checkbox, then click on any other column of the gridview (like Report Name or Notes column), checkbox gets checked.
2. Checking/UnChecking the chekcbox selects and highlights entire row.

Please provide the steps for how to avoid these two issues.

Regards,
Sasi
0
Dimitrina
Telerik team
answered on 27 May 2013, 01:56 PM
Hi Sasi,

The GridViewSelectColumn is designed to be synchronized with the GridView's SelectedItems. If you would like to avoid this, then I can suggest you to set CanUserSelect to False for the RadGridView. That way the selection will be handled only through the SelectColumn's CheckBoxes. 

Regards,
Didie
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Sasireka
Top achievements
Rank 1
answered on 28 May 2013, 06:12 AM
Hi Didie,

Thank you so much. It is working fine for my first requirement.

Do you have any solution for my second requirement? The entire row selected and highlighted when i check / uncheck of the checkbox. Please tell me on how to avoid the row selection..

Please let me know whether it is possible or not..

Regards,
Sasi
0
Dimitrina
Telerik team
answered on 28 May 2013, 07:23 AM
Hello Sasi,

It is not sure how to interpret your second requirement. Would you please clarify what behavior would you like to achieve? 

Regards,
Didie
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Sasireka
Top achievements
Rank 1
answered on 28 May 2013, 07:43 AM
Hi Didie,

When i check the checkbox in gridview, the entire row of the checkbox get selected (i.e. Hightlighted) by default. I have to avoid the row selection.

Regards,
Sasireka
0
Dimitrina
Telerik team
answered on 28 May 2013, 09:06 AM
Hi,

If you would like to not select the row together with the CheckBox in that column, then I would suggest you to use GridViewCheckBoxColumn instead. You can also define a basic column with CheckBox as its CellTemplate.

Regards,
Didie
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Sasireka
Top achievements
Rank 1
answered on 28 May 2013, 09:39 AM
Hi,

Ok. Thanks for your reply. But i need the functionality of checking all child checkboxes then the header checkbox should be checked vice versa.. Also if i checked the header checkbox then the child should get checked.. Is it possible in the "GridViewCheckBoxColumn".

If possible please share samples for this.

Thanks & Regards,
Sasi
0
Dimitrina
Telerik team
answered on 28 May 2013, 11:02 AM
Hello Sasi,

You should implement that functionality yourself customizing a column to serve your needs. You should redefine the column's header and place a CheckBox inside it. The column.Header is of type object and you can assign an CheckBox object for it directly.
Then you should ensure that its checked state is synchronized with the checked states of the CheckBoxes in the rows. 

I would suggest you to also check this forum thread showing different scenarios with custom select CheckBox column.

 

Regards,
Didie
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Todd Davis
Top achievements
Rank 1
Answers by
Milan
Telerik team
Sasireka
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or