1
1
import * as ReactDOM from 'react-dom' ;
2
2
import * as React from 'react' ;
3
- import { GridComponent , ColumnsDirective , ColumnDirective , Freeze , Inject , Resize } from '@syncfusion/ej2-react-grids' ;
3
+ import { GridComponent , ColumnsDirective , ColumnDirective , Freeze , Inject , Resize , Sort } from '@syncfusion/ej2-react-grids' ;
4
4
import { data } from '../data' ;
5
5
import { NumericTextBoxComponent } from '@syncfusion/ej2-react-inputs' ;
6
6
import { ButtonComponent } from '@syncfusion/ej2-react-buttons' ;
@@ -23,8 +23,8 @@ export class FrozenRows extends SampleBase<{}, {}> {
23
23
return (
24
24
< div className = 'control-pane' >
25
25
< div className = 'control-section' >
26
- < div className = ' col-lg-8' >
27
- < GridComponent dataSource = { data . slice ( 0 , 50 ) } height = '350' frozenRows = { 2 } frozenColumns = { 1 } allowSelection = { false } enableHover = { false } allowResizing = { true } ref = { g => this . grid = g } >
26
+ < div className = 'col-lg-8' >
27
+ < GridComponent dataSource = { data . slice ( 0 , 50 ) } height = '350' frozenRows = { 2 } frozenColumns = { 1 } allowSelection = { false } enableHover = { false } allowResizing = { true } allowSorting = { true } allowMultiSorting = { false } ref = { g => this . grid = g } >
28
28
< ColumnsDirective >
29
29
< ColumnDirective field = 'OrderID' headerText = 'Order ID' width = '120' textAlign = 'right' > </ ColumnDirective >
30
30
< ColumnDirective field = 'Freight' headerText = 'Freight' width = '125' format = 'C2' />
@@ -37,9 +37,9 @@ export class FrozenRows extends SampleBase<{}, {}> {
37
37
< ColumnDirective field = 'ShipCity' headerText = 'Ship City' width = '250' > </ ColumnDirective >
38
38
< ColumnDirective field = 'ShipCountry' headerText = 'Ship Country' width = '250' > </ ColumnDirective >
39
39
</ ColumnsDirective >
40
- < Inject services = { [ Freeze , Resize ] } />
40
+ < Inject services = { [ Freeze , Resize , Sort ] } />
41
41
</ GridComponent >
42
- </ div >
42
+ </ div >
43
43
< div className = 'col-lg-4 property-section' >
44
44
< PropertyPane title = 'Properties' >
45
45
< table id = "property" title = "Properties" className = 'property-panel-table' style = { { width : '100%' } } >
0 commit comments