PDA

View Full Version : PropertyGrid startEdit Problem



chenjie100
20 Aug 2011, 7:17 PM
I wannt to start edit first row of propertyGrid via script, like this
propertyGrid.start(rowNum,colNum), but it does not works.
thanks.

aacoro
21 Aug 2011, 7:28 AM
Example handler of a Add button:


rowEditing.cancelEdit();
// Create a record instance through the ModelManager
var r = Ext.ModelManager.create({
Id : 0,
Duration : 1
}, 'UnplannedTask');




taskStore.insert(0, r);
rowEditing.startEdit(0,0);


You should post your code if you need help...

chenjie100
21 Aug 2011, 6:04 PM
Thank you, aacoro.
In extjs3, editing a row of grid, can use this method grid.startEditing(row,col), but in extjs4 there has no this method or similar.
I have a propertyGrid, I want start editing the first row of it's value property when page has loaded.
Please tell me how to do? Thanks.

aacoro
22 Aug 2011, 12:50 AM
My code snippet belongs to Ext JS4. It has the same method as in Ext JS3:

rowEditing.startEdit(0,0);
Btw, the thing you want is this: http://dev.sencha.com/deploy/ext-4.0.2a/examples/grid/row-editing.html

(http://dev.sencha.com/deploy/ext-4.0.2a/examples/grid/row-editing.html)Did you checked this example yet??

chenjie100
22 Aug 2011, 5:26 AM
Thank you