PDA

View Full Version : [CLOSED] GridPanel - select cell, but not in edit mode on load



rthiney
Jan 08, 2014, 8:42 PM
I want to select a cell when the grid loads.. but not place in edit mode...like in image: how can I do that?
7458

Zdenek
Jan 08, 2014, 10:22 PM
Hello

http://examples2.ext.net/#/GridPanel/Selection_Models/Cell_Selection/

key part for you is :


CellSelectionModel sm = this.GridPanel1.GetSelectionModel() as CellSelectionModel;
sm.SelectedCell.ColIndex = 1;
sm.SelectedCell.RowIndex = 1;

and


<SelectionModel>
<ext:CellSelectionModel runat="server">
</ext:CellSelectionModel>
</SelectionModel>

Personaly - do you really need selection? maybe you just need to change background color of particular cell(s)? ( that could be done using custom renderer for example)