Disable clicking around checkbox in cell

3 posts, 0 answers
  1. Jon
    Jon avatar
    2 posts
    Member since:
    Oct 2011

    Posted 30 Jul 2012 Link to this post

    I have a RadGridView with a cell that has a checkbox in it.  This is defined using a DataTemplate like this:

            <DataTemplate x:Key="CheckBoxCellTemplate">
                        IsChecked="{Binding Path=IsSelected, Mode=TwoWay}" />

                  CellTemplate="{StaticResource CheckBoxCellTemplate}">

    This functionality is designed to let the user click the checkboxes to select lots of rows (yeah, I know you can shift-click and ctrl-click to select rows).

    The problem is that sometimes they want to check a bunch of checkboxes, but they barely miss the checkbox and click the cell area around the checkbox, which then selects that one row and unchecks all of their checkboxes.  Is there a way that I can either (a) expand the controls in the DataTemplate to take up all of the cell area or (b) prevent clicks in the cell area in a single column from causing the row to become selected?

  2. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 31 Jul 2012 Link to this post


    If you would like to select only by checking the CheckBoxes, the you could disable user selection on GridView level (with setting CanUserSelect ="False").

    Kind regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Jon
    Jon avatar
    2 posts
    Member since:
    Oct 2011

    Posted 31 Jul 2012 Link to this post

    I still want to be able to select the rows by clicking on them.  Can I do something like CanUserSelect on the cell level?
Back to Top