Hello,
I'v made a GridComponenet with data source and edit enable but when i change a record in the table it wont update the change in data source, how do i update the data source?
import data from './Tablesource/WorkGroupsQuery.json'
import {GridComponent , Inject, Edit ,ColumnDirective,ColumnsDirective, Toolbar} from '@syncfusion/ej2-react-grids'
let WorkGroupsQueryData = []
data.Parameters.map( (info, index) =>{WorkGroupsQueryData.push(info)})
const toolbaritems= ['Add', 'Edit', 'Delete', 'Cancel',Update']
const editsettings = {allowEditing: true, allowAdding: true, allowDeleting: true, mode: 'Batch' }
<GridComponent
dataSource={WorkGroupsQueryData}
editSettings = {editsettings}
toolbar = {toolbaritems}
>
<ColumnsDirective>
<ColumnDirective field='Field' headerText='Field' width='100' textAlign="Right" />
<ColumnDirective field='Type' headerText='Type' width='100' textAlign="Right"/>
<ColumnDirective field='Caption' headerText='Caption' width='100' textAlign="Right"/>
<ColumnDirective field='Visible' headerText='Visible' width='100' textAlign="Right"/>
<ColumnDirective field='LookUp' headerText='LookUp' width='100' textAlign="Right"/>
<ColumnDirective field='ShowOperators' headerText='ShowOperators' width='100' textAlign="Right"/>
<ColumnDirective field='OperatorGroup' headerText='OperatorGroup' width='100' textAlign="Right"/>
<ColumnDirective field='DefaultOperator' headerText='DefaultOperator' width='100' textAlign="Right"/>
<ColumnDirective field='DefaultValue' headerText='DefaultValue' width='100' textAlign="Right"/>
<ColumnDirective field='Orientation' headerText='Orientation' width='100' textAlign="Right"/>
</ColumnsDirective>
<Inject services={[Edit,Toolbar]} />
</GridComponent>