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

11 posts, 0 answers
  1. Todd Davis
    Todd Davis avatar
    36 posts
    Member since:
    Aug 2009

    Posted 22 Mar 2010 Link to this post

    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?
  2. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 22 Mar 2010 Link to this post

    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.
  3. DevCraft banner
  4. Sasireka
    Sasireka avatar
    17 posts
    Member since:
    Nov 2012

    Posted 22 May 2013 Link to this post

    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
  5. Sasireka
    Sasireka avatar
    17 posts
    Member since:
    Nov 2012

    Posted 22 May 2013 Link to this post

    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
  6. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 27 May 2013 Link to this post

    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.

  7. Sasireka
    Sasireka avatar
    17 posts
    Member since:
    Nov 2012

    Posted 28 May 2013 Link to this post

    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
  8. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 28 May 2013 Link to this post

    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.

  9. Sasireka
    Sasireka avatar
    17 posts
    Member since:
    Nov 2012

    Posted 28 May 2013 Link to this post

    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
  10. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 28 May 2013 Link to this post

    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.

  11. Sasireka
    Sasireka avatar
    17 posts
    Member since:
    Nov 2012

    Posted 28 May 2013 Link to this post

    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
  12. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 28 May 2013 Link to this post

    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.

Back to Top
DevCraft banner