SMART datagrid v1.4 > Classes

Back  Forward

DataLudi.GridDataSet  class

그리드뷰가 사용하는 모든 데이터를 브라우저 메모리에 저장하고 관리하는 데이터셋이다. 그리드뷰는 이 데이터셋의 값들을 표시하고, 추가, 수정, 삭제 등 데이터셋의 변경은 즉시 그리드뷰에 반영된다. 또, 그리드뷰를 통해 사용자가 입력한 데이터는 Validation 등 적정한 절차를 거쳐 데이터셋에 적용된다. 

Base Classes
DataSet > EventAware > DLBase
Constructor
function GridDataSet (fields: Array, derivedFields: Array);
Inherited Properties
DataSet.amText
DataSet.baseYear
DataSet.booleanFormat
DataSet.checkStates
DataSet.dataInited
DataSet.datetimeFormat
DataSet.deleteCreated
DataSet.deletedCount
DataSet.eventsOnStack
DataSet.fieldCount
DataSet.fields
DataSet.nanValue
DataSet.pmText
DataSet.restoreMode
DataSet.rowCount
DataSet.softDelete
DataSet.strictRestore
DataSet.undoable
Methods
appendRow
appendRows
appendXmlRows
canAppendRow
canDeleteRow
canInsertRow
canUpdateRow
canUpdateValue
clearRows
deleteRow
deleteRows
exportToCsv
exportToJson
filterRows
findRow
findRows
getFieldValues
getModifiedRowObjects
getRow
getRowObject
getRowObjects
getRowProps
getRows
getRowsProps
getValue
getValues
hasData
insertRow
insertRows
insertXmlRows
moveRow
moveRows
setRowCount
setRows
setValue
setValueEx
setXmlRows
updateRow
updateRows
updateValues
updateXmlRows
Inherited Methods
EventAware.addListener
DLBase.assign
DataSet.beginUpdate
DataSet.canRedo
DataSet.canUndo
DataSet.canUpdateValue
DataSet.clearRowStates
DataSet.clearRowTags
DataSet.clearUndo
DataSet.ctor
DataSet.endUpdate
DataSet.fieldByName
DataSet.getAllStateRows
DataSet.getDistinctValues
DataSet.getField
DataSet.getFieldIndex
DataSet.getFieldIndexEx
DataSet.getFieldName
DataSet.getFieldNames
DLBase.getProperties
DLBase.getProperty
DataSet.getRowsByTag
DataSet.getRowsByTags
DataSet.getRowState
DataSet.getRowStateCount
DataSet.getRowTag
DataSet.getStateRows
DataSet.hasData
DataSet.recalcRows
DataSet.redo
EventAware.removeListener
DataSet.restoreUpdatedRows
DataSet.restoreUpdatedStates
DataSet.setFields
DLBase.setProperties
DLBase.setProperty
DataSet.setRowState
DataSet.setRowStates
DataSet.setRowTag
DataSet.setRowTags
DLBase.toggle
DataSet.undo
DataSet.unsetRowTags
Events
onRowDeleted
onRowDeleting
onRowInserted
onRowInserting
onRowMoved
onRowMoving
onRowsDeleted
onRowsDeleting
onRowsInserted
onRowsInserting
onRowsMoved
onRowsMoving
onRowsUpdated
onRowsUpdating
onRowUpdated
onRowUpdating
onStateChanged
onStatesChanged
onTagChanged
onTagsChanged
onValueChanged
onValueChanging
onValuesUpdating
Inherited Events
DataSet.onCommandStackChanged
DataSet.onDataChanged
DataSet.onRefresh
DataSet.onRowCountChanged
DataSet.onStatesCleared
DataSet.onTagsCleared

 

Code -1
    var fields = [{
        fieldName: 'field1',
        dataType: 'number'
    }, {
        fieldName: 'field2'
    },
        "field3",
        "field3",
        ...
    ];
    var derivedFields = [{
        fieldName: 'amount',
        experssion: 'price * quantity'
    }]
    var ds = new DataLudi.GridDataSet(fields, derivedFields);
    // 아래처럼 해도 된다.
    // var ds = DataLudi.createGridDataSet(fields, derivedFields);
    grid.setDataSource(ds);
See Also
createGridDataSet
GridView
Examples
GridDataSet Rows
GridDataSet 편집
Set DataRows
Set RowCount