Feb 09, 2010, 2:44 PM
[CLOSED] get rowindex for grid
Hi
using 0.8.2 I am building a grid in code behind. Say 3 columns and one CommandColumn. When i click on the commandcolumn, I would like to put column 3 in edit mode.
thank you
Idriss
</p>
using 0.8.2 I am building a grid in code behind. Say 3 columns and one CommandColumn. When i click on the commandcolumn, I would like to put column 3 in edit mode.
// build Grid
// Add my command Handler for the ColumnCommand
grid.Listeners.Command.Handler = "commandHandler(command, record, grid2, e);";
aspx page -
// command contains the text of the command
// record has the current record
// grid is reference of grid
// but e is null</p>
var commandHandler = function(command, record, grid, e) {</p>
if (record != null) {</p>
grid2.getColumnModel().setEditor(2, new Ext.grid.GridEditor(new Ext.form.TextField({ id: ", field1" }) ) );</p>
grid2.getColumnModel().setEditable(2, true);</p>
grid2.startEditing(0, 2);</p>
}</p>
else {</p>
//Ext.Msg.alert(command, "-1");</p>
}</p>
};
How to get the current RowIndex so I can set grid2.startEditing(rowIndex, 2);thank you
Idriss
</p>