Goals:
Problems:
How Can I handle this issue so that the pre-selected, selected and deselected rows will displayed and updated correctly after filter operations?
Here the relevant simplified components for this issue:
Kind Regards
Hi Manivel,
as this feature is crucial for a currently running project:
when could be expect to get an answer from your side?
Thanks
Andreas
|
. . .
export class App extends React.Component {
constructor() {
super(...arguments);
// we have enabled the persistSelection to maintain the grid selected records
this.selectionsettings = { persistSelection: true };
this.flag = true;
this.filterSettings = {
showFilterBarOperator: true,
mode: "Immediate"
};
}
dataBound(args) {
if (this.flag) {
this.flag = false;
// using flag variable we have selected the rows in the initial rendering only
this.gridInstance.selectRows([0,3]);
}
}
render() {
return (<div className='control-pane'>
<div className='control-section'>
<GridComponent dataSource={orderDetails} dataBound={this.dataBound.bind(this)} ref={grid => this.gridInstance = grid}
allowPaging={true} pageSettings={{ pageCount: 5 }} selectionSettings={this.selectionsettings} allowFiltering={true} filterSettings={this.filterSettings}>
<ColumnsDirective>
<ColumnDirective type='checkbox' width='50'></ColumnDirective>
<ColumnDirective field='OrderID' isPrimaryKey={true} headerText='Order ID' width='120' textAlign="Right"></ColumnDirective>
<ColumnDirective field='CustomerName' filter={{operator: "contains" }} headerText='Customer Name' width='150'></ColumnDirective>
. . .
</ColumnsDirective>
<Inject services={[Page, Selection,Filter, Toolbar, Edit]}/>
</GridComponent>
</div>
</div>);
}
}
ReactDOM.render(<App />, document.getElementById('root'));
|