@@ -12,7 +12,6 @@ import HeaderGroupComponent from './HeaderGroupComponent.jsx';
1212import SortableHeaderComponent from './SortableHeaderComponent.jsx' ;
1313
1414import "./RichGridDeclarativeExample.css" ;
15-
1615// take this line out if you do not want to use ag-Grid-Enterprise
1716import "ag-grid-enterprise" ;
1817
@@ -123,13 +122,21 @@ export default class RichGridDeclarativeExample extends Component {
123122 < div >
124123 < span >
125124 Grid API:
126- < button onClick = { ( ) => { this . api . selectAll ( ) } } className = "btn btn-primary" > Select All</ button >
127- < button onClick = { ( ) => { this . api . deselectAll ( ) } } className = "btn btn-primary" > Clear Selection</ button >
125+ < button onClick = { ( ) => {
126+ this . api . selectAll ( )
127+ } } className = "btn btn-primary" > Select All</ button >
128+ < button onClick = { ( ) => {
129+ this . api . deselectAll ( )
130+ } } className = "btn btn-primary" > Clear Selection</ button >
128131 </ span >
129132 < span style = { { float : "right" } } >
130133 Column API:
131- < button onClick = { ( ) => { this . columnApi . setColumnVisible ( 'country' , false ) } } className = "btn btn-primary" > Hide Country Column</ button >
132- < button onClick = { ( ) => { this . columnApi . setColumnVisible ( 'country' , true ) } } className = "btn btn-primary" > Show Country Column</ button >
134+ < button onClick = { ( ) => {
135+ this . columnApi . setColumnVisible ( 'country' , false )
136+ } } className = "btn btn-primary" > Hide Country Column</ button >
137+ < button onClick = { ( ) => {
138+ this . columnApi . setColumnVisible ( 'country' , true )
139+ } } className = "btn btn-primary" > Show Country Column</ button >
133140 </ span >
134141 </ div >
135142 < div style = { { display : "inline-block" , width : "100%" , marginTop : 10 , marginBottom : 10 } } >
@@ -150,10 +157,11 @@ export default class RichGridDeclarativeExample extends Component {
150157 < button onClick = { this . invokeSkillsFilterMethod }
151158 className = "btn btn-primary" > Invoke Skills Filter Method
152159 </ button >
153- < button onClick = { this . dobFilter } className = "btn btn-primary" > DOB equals to 01/01/2000ß</ button >
160+ < button onClick = { this . dobFilter } className = "btn btn-primary" > DOB equals to 01/01/2000ß
161+ </ button >
154162 </ div >
155163 </ div >
156- < div style = { { height : 400 , width : 900 } } className = "ag-fresh " >
164+ < div style = { { height : 400 , width : 900 } } className = "ag-theme-balham " >
157165 < AgGridReact
158166 // listening for events
159167 onGridReady = { this . onGridReady }
@@ -179,7 +187,6 @@ export default class RichGridDeclarativeExample extends Component {
179187 enableFilter
180188 floatingFilter
181189 groupHeaders
182- rowHeight = "22"
183190
184191 // setting grid wide date component
185192 dateComponentFramework = { DateComponent }
@@ -192,20 +199,36 @@ export default class RichGridDeclarativeExample extends Component {
192199 }
193200 } }
194201 >
195- < AgGridColumn headerName = "#" width = { 30 } checkboxSelection suppressSorting suppressMenu suppressFilter pinned > </ AgGridColumn >
202+ < AgGridColumn headerName = "#" width = { 30 }
203+ checkboxSelection suppressSorting suppressMenu suppressFilter pinned >
204+ </ AgGridColumn >
196205 < AgGridColumn headerName = "Employee" headerGroupComponentFramework = { HeaderGroupComponent } >
197- < AgGridColumn field = "name" width = { 150 } enableRowGroup enablePivot pinned editable cellEditorFramework = { NameCellEditor } > </ AgGridColumn >
198- < AgGridColumn field = "country" width = { 150 } enableRowGroup enablePivot pinned editable cellRenderer = { RichGridDeclarativeExample . countryCellRenderer } filterParams = { { cellRenderer : RichGridDeclarativeExample . countryCellRenderer , cellHeight :20 } } > </ AgGridColumn >
199- < AgGridColumn field = "dob" width = { 145 } headerName = "DOB" filter = "agDateColumnFilter" pinned columnGroupShow = "open" cellRenderer = { RichGridDeclarativeExample . dateCellRenderer } > </ AgGridColumn >
206+ < AgGridColumn field = "name" width = { 150 }
207+ cellEditorFramework = { NameCellEditor }
208+ enableRowGroup enablePivot pinned editable />
209+ < AgGridColumn field = "country" width = { 150 }
210+ cellRenderer = { RichGridDeclarativeExample . countryCellRenderer }
211+ filterParams = { {
212+ cellRenderer : RichGridDeclarativeExample . countryCellRenderer ,
213+ cellHeight : 20
214+ } }
215+ enableRowGroup enablePivot pinned editable />
216+ < AgGridColumn field = "dob" width = { 175 } headerName = "DOB" filter = "agDateColumnFilter"
217+ pinned columnGroupShow = "open"
218+ cellRenderer = { RichGridDeclarativeExample . dateCellRenderer } />
200219 </ AgGridColumn >
201220 < AgGridColumn headerName = "IT Skills" >
202- < AgGridColumn field = "skills" width = { 120 } enableRowGroup enablePivot suppressSorting cellRendererFramework = { SkillsCellRenderer } filterFramework = { SkillsFilter } > </ AgGridColumn >
203- < AgGridColumn field = "proficiency" width = { 135 } enableValue cellRendererFramework = { ProficiencyCellRenderer } filterFramework = { ProficiencyFilter } > </ AgGridColumn >
221+ < AgGridColumn field = "skills" width = { 120 } enableRowGroup enablePivot suppressSorting
222+ cellRendererFramework = { SkillsCellRenderer }
223+ filterFramework = { SkillsFilter } />
224+ < AgGridColumn field = "proficiency" width = { 135 } enableValue
225+ cellRendererFramework = { ProficiencyCellRenderer }
226+ filterFramework = { ProficiencyFilter } />
204227 </ AgGridColumn >
205228 < AgGridColumn headerName = "Contact" >
206- < AgGridColumn field = "mobile" width = { 150 } filter = "text" > </ AgGridColumn >
207- < AgGridColumn field = "landline" width = { 150 } filter = "text" > </ AgGridColumn >
208- < AgGridColumn field = "address" width = { 500 } filter = "text" > </ AgGridColumn >
229+ < AgGridColumn field = "mobile" width = { 150 } filter = "text" / >
230+ < AgGridColumn field = "landline" width = { 150 } filter = "text" / >
231+ < AgGridColumn field = "address" width = { 500 } filter = "text" / >
209232 </ AgGridColumn >
210233 </ AgGridReact >
211234 </ div >
@@ -215,7 +238,8 @@ export default class RichGridDeclarativeExample extends Component {
215238 </ div >
216239 < div className = "row" >
217240 < div className = "col-sm-12" >
218- < h5 > This example demonstrates many features of ag-Grid, with Grid and Column Definition defined declaratively (i.e. with markup).</ h5 >
241+ < h5 > This example demonstrates many features of ag-Grid, with Grid and Column Definition
242+ defined declaratively (i.e. with markup).</ h5 >
219243 < p > < span style = { { fontWeight : 500 } } > Select All/Clear Selection</ span > : Select or Deselect
220244 All
221245 Rows</ p >
0 commit comments