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

excel like block selection using arrow keys

3 Answers 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
wireclou
Top achievements
Rank 1
wireclou asked on 12 Aug 2014, 06:02 AM
This demo shows ability to use mouse to drag over rows / and columns and select a block as in excel:

http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/selecting/cell-selection/defaultcs.aspx

However, shift / arrow keys don't to the same thing. They select individual cells as you move.

Is it possible to use shift / arrow keys to select a block of cells like in excel?

thanks

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 12 Aug 2014, 06:22 AM
Hi wireclou,

You can set the property AllowMultiRowSelection="true" to select multiple rows of Grid along with AllowRowSelect and AllowKeyboardNavigation to true.

ASPX:
<telerik:RadGrid ID="rgrdSample" runat="server" AllowMultiRowSelection="true". .> 
    <ClientSettings AllowKeyboardNavigation="true">    
        <Selecting AllowRowSelect="true" />
    </ClientSettings>
</telerik:RadGrid>

Thanks,
Princy
0
wireclou
Top achievements
Rank 1
answered on 12 Aug 2014, 06:51 AM
Thanks Princy.

Those are indeed my current settings, and here it how it currently behaves:

If I select a cell and then go right twice, and then down twice I end up with 5 cells selected in an 'L' shape.

However, what I want is 9 cells selected in a rectangle as in excel. Is this how it behaves for you?
0
Princy
Top achievements
Rank 2
answered on 13 Aug 2014, 04:09 AM
Hi wireclou,

I guess you have set the CellSelectionMode for your grid that is why its selecting only each cell and not entire row. Please try setting it to none.

ASPX:
<ClientSettings AllowKeyboardNavigation="true">
    <Selecting AllowRowSelect="true" CellSelectionMode="None" />
</ClientSettings>

Thanks,
Princy
Tags
Grid
Asked by
wireclou
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
wireclou
Top achievements
Rank 1
Share this question
or