I need to save the grid index of the record in a particular field of the record in the datasource at the time of drop.
My code looks like:
I know that the drop only organizes the records on the client and the server does not hold.
Thus, after passing through the UpdateData, the drop is broken - the record in the grid back where it was because I think the grid to take back the order that is in the datasource after UpdateData.
How do I get the grid with the records in the correct place after the UpdateData?
I tried several ways but could not. I believe that a simple fetch solve the problem, but where it could fetch call this?
SmartClient Ajax RIA system
Version 8.0/EVAL Development Only (2011-01-21)
Browser: IE9 e Chrome18.0.1025.168
My code looks like:
Code:
isc.ListGrid.create({ ID: "nivelEAPFisicaList", width: "100%", height: "100%", alternateRecordStyles: true, dataSource: nivelEAPFisicaDS, dataPageSize: 50, autoFetchData: true, canEdit: true, canRemoveRecords: true, canSort: false, canReorderRecords: true, selectionType: "single", fields: [ { name: "NFS_NOME" }, { name: "NFS_COR_FUNDO" }, { name: "NFS_COR_FONTE" } ], recordDrop: function (dropRecords, targetRecord, index, sourceWidget) { dropRecords[0].NFS_NIVEL = index; nivelEAPFisicaDS.updateData(dropRecords[0]); this.Super("recordDrop", arguments); }, rowEditorExit: function (EditCompletionEvent, record, newValues, rowNum) { if (record == null) { newValues.NFS_NIVEL = rowNum; } } })
Thus, after passing through the UpdateData, the drop is broken - the record in the grid back where it was because I think the grid to take back the order that is in the datasource after UpdateData.
How do I get the grid with the records in the correct place after the UpdateData?
I tried several ways but could not. I believe that a simple fetch solve the problem, but where it could fetch call this?
SmartClient Ajax RIA system
Version 8.0/EVAL Development Only (2011-01-21)
Browser: IE9 e Chrome18.0.1025.168
Comment