Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
440
Row and Cell Selection in Grid
posted

Hi,

I'd like to be able to navigate the grid with my arrows keys like excel. I would also like the ability to select multiple rows.

Currently, if I edit a cell and hit enter and want to navigate around with my arrow keys, the whole row is selected. I'd like be able to move around the cells.

My mark up for selection:

<ig:Selection CellClickAction="Cell" CellSelectType="Single" ColumnSelectType="None" RowSelectType="Multiple">

</ig:Selection>

So things I need to be able to do:

- Select multiple columns by selecting the row header

- Navigate the grid like Excel.

- Once I am done with editing a cell, if I tab off, or hit enter or whatever, I need to be able to use the arrow keys to continue navigating the grid and seeing the focus on cells.

Thanks much for the help!

  • 440
    posted

    More markup to help...Currently if I move off a cell it selects the entire row...

    <ig:WebDataGrid ID="webgrid" DataKeyFields="account_line_id" runat="server"
                Width="100%"
                Height="100%"
                AutoGenerateColumns="False"
                StyleSetName="ElectricBlue"
                Font-Names="Arial Monospaced"
                ViewStateMode="Disabled">
                <ClientEvents
                    Initialize="webgrid_Initialize"
                    MouseDown="webgrid_GridMouseDown" />
                <Behaviors>    
                    <ig:Activation Enabled="true">
                    </ig:Activation>
                    <ig:ColumnMoving DragStyle="Follow" Enabled="true">
                        <ColumnSettings>
                            <ig:ColumnMoveSetting ColumnKey="Attachment" EnableMove="false" />
                        </ColumnSettings>
                    </ig:ColumnMoving>
                    <ig:ColumnResizing Enabled="true"></ig:ColumnResizing>
                    <ig:EditingCore>
                        <Behaviors>
                            <ig:CellEditing Enabled="true" EditModeActions-MouseClick="Double" EditModeActions-EnableOnKeyPress="true"
                                CellEditingClientEvents-EnteringEditMode="webgrid_EnteringEditMode"
                                CellEditingClientEvents-EnteredEditMode="webgrid_EnteredEditMode"
                                CellEditingClientEvents-ExitedEditMode="webgrid_ExitedEditMode" >
                            </ig:CellEditing>
                        </Behaviors>
                    </ig:EditingCore>
                    <ig:Paging Enabled="false"></ig:Paging>
                    <ig:RowSelectors Enabled="true">
                    </ig:RowSelectors>
                    <ig:Sorting Enabled="false"></ig:Sorting>
                    <ig:Selection CellClickAction="Cell" CellSelectType="Single" ColumnSelectType="None" RowSelectType="Multiple">
                        <AutoPostBackFlags RowSelectionChanged="true" />
                    </ig:Selection>
                </Behaviors>
            </ig:WebDataGrid>