Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
146626 | Aug 11,2019 08:19 PM UTC | Aug 12,2019 09:56 AM UTC | React - EJ 2 | 1 |
![]() |
Tags: Grid |
import { render } from 'react-dom';
import './index.css';
import * as React from 'react';
import { GridComponent, ColumnsDirective, ColumnDirective, Page, Toolbar, Inject } from '@syncfusion/ej2-react-grids';
import { categoryData } from './data';
import { SampleBase } from './sample-base';
export class Searching extends SampleBase {
constructor() {
super(...arguments);
this.toolbarOptions = ['Search'];
}
dataBound() {
const proxy = this;
this.element.querySelector('#' + this.element.getAttribute('id') + '_searchbar').addEventListener('keyup', function(e){
this.closest('.e-grid').ej2_instances[0].search(this.value);
});
}
render() {
return (<div className='control-pane'>
<div className='control-section row'>
<GridComponent dataSource={categoryData} toolbar={this.toolbarOptions} dataBound={this.dataBound} allowPaging={true}>
. ..
. . . .
<Inject services={[Toolbar, Page]}/>
</GridComponent>
</div>
</div>);
}
}
render(<Searching />, document.getElementById('sample')); |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.