Oct 18, 2011, 7:56 AM
SelectionModel with end row
hi all,
i'm using SelectionModel save data, but when I press Enter to end row, it's dirty. I can't Save
hope this help
sorry,i not fluent English :(
i'm using SelectionModel save data, but when I press Enter to end row, it's dirty. I can't Save
hope this help
sorry,i not fluent English :(
<SelectionModel>
<ext:RowSelectionModel SingleSelect="true" MoveEditorOnEnter="true">
<Listeners>
<RowDeselect Fn="RowDeselect" />
</Listeners>
</ext:RowSelectionModel>
</SelectionModel>
function RowDeselect(el, index, record) {
var data = record.data;
var JsonDetail = ''
if (record != null)
JsonDetail = '[' + Ext.encode(record.data) + ']';
if (record.dirty) {
DirectMethod.SaveListPrice(JsonDetail, {
success: function(ProductId) {
var Record = grDetail.store.getAt(index);
if (Record != null) {
Record.set('ProductId', ProductId);
Record.commit();
}
}
})
}
}