Syncfusion.EJ2
Properties  Methods 


Grid Class Members

The following tables list the members exposed by Grid.

Public Constructors
 NameDescription
Public Constructor  
Top
Public Properties
 NameDescription
Public Property Triggers when Grid actions such as sorting, filtering, paging, grouping etc., starts.  
Public Property Triggers when Grid actions such as sorting, filtering, paging, grouping etc. are completed.  
Public Property Triggers when any Grid action failed to achieve the desired results.  
Public Property Configures the Grid aggregate rows. > Check the [`Aggregates`](../../grid/aggregates/) for its configuration.  
Public Property If `allowExcelExport` set to true, then it will allow the user to export grid to Excel file.  
Public Property If `allowFiltering` set to true the filter bar will be displayed. If set to false the filter bar will not be displayed. Filter bar allows the user to filter grid records with required criteria.  
Public Property If `allowGrouping` set to true, then it will allow the user to dynamically group or ungroup columns. Grouping can be done by drag and drop columns from column header to group drop area.  
Public Property If `allowMultiSorting` set to true, then it will allow the user to sort multiple column in the grid. > `allowSorting` should be true.  
Public Property If `allowPaging` is set to true, the pager renders at the footer of the Grid. It is used to handle page navigation in the Grid.  
Public Property If `allowPdfExport` set to true, then it will allow the user to export grid to Pdf file.  
Public Property If `allowReordering` is set to true, Grid columns can be reordered. Reordering can be done by drag and drop of a particular column from one index to another index. > If Grid is rendered with stacked headers, reordering is allowed only at the same level as the column headers.  
Public Property If `allowResizing` is set to true, Grid columns can be resized.  
Public Property If `allowRowDragAndDrop` is set to true, you can drag and drop grid rows at another grid.  
Public Property If `allowSelection` is set to true, it allows selection of (highlight row) Grid records by clicking it.  
Public Property If `allowSorting` is set to true, it allows sorting of grid records when column header is clicked.  
Public Property If `allowTextWrap` set to true, then text content will wrap to the next line when its text content exceeds the width of the Column Cells.  
Public Property Triggers when records are added in batch mode.  
Public Property Triggers when cancel the batch edit changes batch mode.  
Public Property Triggers when records are deleted in batch mode.  
Public Property Triggers before records are added in batch mode.  
Public Property Triggers before records are deleted in batch mode.  
Public Property Triggers before records are saved in batch mode.  
Public Property Triggers before Grid copy action.  
Public Property Triggers before data is bound to Grid.  
Public Property Triggers before Grid data is exported to Excel file.  
Public Property Triggers before the columnChooser open.  
Public Property Triggers before Grid paste action.  
Public Property Triggers before Grid data is exported to PDF document.  
Public Property Triggers before the print action starts.  
Public Property Triggers before the record is to be edit.  
Public Property Triggers when a particular selected cell is deselected.  
Public Property Triggers before the selected cell is deselecting.  
Public Property Triggers when the cell is being edited.  
Public Property Triggers when cell is saved.  
Public Property Triggers when cell is saved.  
Public Property Triggers after a cell is selected.  
Public Property Triggers before any cell selection occurs.  
Public Property Triggers when the check box state change in checkbox column.  
Public Property Defines Grid options to render child Grid. It requires the [`queryString`](grid/#querystring-string) for parent and child relationship.  
Public Property Triggers when column header element is dragged (moved) continuously.  
Public Property Triggers when column header element drag (move) starts.  
Public Property Triggers when a column header element is dropped on the target column.  
Public Property Triggers when click on column menu.  
Public Property `columnMenuItems` defines both built-in and custom column menu items. The available built-in items are, `AutoFitAll` - Auto fit the size of all columns. `AutoFit` - Auto fit the current column. `Group` - Group by current column. `Ungroup` - Ungroup by current column. `SortAscending` - Sort the current column in ascending order. `SortDescending` - Sort the current column in descending order. `Filter` - Filter options will show based on filterSettings property like checkbox filter, excel filter, menu filter.  
Public Property Triggers before column menu opens.  
Public Property `columnQueryMode`provides options to retrive data from the datasource.Their types are `All`: It Retrives whole datasource. `Schema`: Retrives data for all the defined columns in grid from the datasource. `ExcludeHidden`: Retrives data only for visible columns of grid from the dataSource.  
Public Property Defines the schema of dataSource. If the `columns` declaration is empty or undefined then the `columns` are automatically generated from data source.  
Public Property Triggers when command button is clicked.  
Public Property Triggers when click on context menu.  
Public Property `contextMenuItems` defines both built-in and custom context menu items. The available built-in items are, `AutoFitAll` - Auto fit the size of all columns. `AutoFit` - Auto fit the current column. `Group` - Group by current column. `Ungroup` - Ungroup by current column. `Edit` - Edit the current record. `Delete` - Delete the current record. `Save` - Save the edited record. `Cancel` - Cancel the edited state. `Copy` - Copy the selected records. `PdfExport` - Export the grid as Pdf format. `ExcelExport` - Export the grid as Excel format. `CsvExport` - Export the grid as CSV format. `SortAscending` - Sort the current column in ascending order. `SortDescending` - Sort the current column in descending order. `FirstPage` - Go to the first page. `PrevPage` - Go to the previous page. `LastPage` - Go to the last page. `NextPage` - Go to the next page.  
Public Property Triggers before context menu opens.  
Public Property Triggers when the component is created.  
Public Property Triggers when data source is populated in the Grid.  
Public Property It is used to render grid table rows. If the `dataSource` is an array of JavaScript objects, then Grid will create instance of [`DataManager`](https://ej2.syncfusion.com/documentation/data/api-dataManager.html) from this `dataSource`. If the `dataSource` is an existing [`DataManager`](https://ej2.syncfusion.com/documentation/data/api-dataManager.html), the Grid will not initialize a new one.  
Public Property Triggers when the grid data is added, deleted and updated. Invoke the done method from the argument to start render after edit operation.  
Public Property Triggers when the grid actions such as Sorting, Paging, Grouping etc., are done. In this event,the current view data and total record count should be assigned to the `dataSource` based on the action performed.  
Public Property Triggers when the component is destroyed.  
Public Property Triggers after detail row expands. > This event triggers at initial expand.  
Public Property The detail template allows you to show or hide additional information about a particular row.  
Public Property Configures the edit settings.  
Public Property If `enableAltRow` is set to true, the grid will render with `e-altrow` CSS class to the alternative tr elements. > Check the [`AltRow`](../../grid/row/#styling-alternate-rows/) to customize the styles of alternative rows.  
Public Property If `enableAutoFill` is set to true, then the auto fill icon will displayed on cell selection for copy cells. It requires the selection `mode` to be Cell and `cellSelectionMode` to be `Box`.  
Public Property If `enableColumnVirtualization` set to true, then the Grid will render only the columns visible within the view-port and load subsequent columns on horizontal scrolling. This helps to load large dataset of columns in Grid.  
Public Property If `enableHover` is set to true, the row hover is enabled in the Grid.  
Public Property Enable or disable persisting component's state between page reloads.  
Public Property Enable or disable rendering component in right to left direction.  
Public Property If `enableVirtualization` set to true, then the Grid will render only the rows visible within the view-port and load subsequent rows on vertical scrolling. This helps to load large dataset in Grid.  
Public Property Triggers after Grid data is exported to Excel file.  
Public Property Triggers before exporting each header cell to Excel file. You can also customize the Excel cells.  
Public Property Triggers before exporting each cell to Excel file. You can also customize the Excel cells.  
Public Property Triggers before exporting each detail Grid to PDF document.  
Public Property Configures the filter settings of the Grid.  
Public Property Gets or sets the number of frozen columns.  
Public Property Gets or sets the number of frozen rows.  
Public Property Defines the mode of grid lines. The available modes are, `Both`: Displays both horizontal and vertical grid lines. `None`: No grid lines are displayed. `Horizontal`: Displays the horizontal grid lines only. `Vertical`: Displays the vertical grid lines only. `Default`: Displays grid lines based on the theme.  
Public Property Configures the group settings.  
Public Property Triggered for stacked header.  
Public Property Defines the scrollable height of the grid content.  
Public Property Defines the hierarchy grid print modes. The available modes are `Expanded` - Prints the master grid with expanded child grids. `All` - Prints the master grid with all the child grids. `None` - Prints the master grid alone.  
Public Property Allows additional HTML attributes such as title, name, etc., and accepts n number of attributes in a key-value pair format.  
Public Property (Inherited from Syncfusion.EJ2.EJTagHelper)
Public Property Triggers when any keyboard keys are pressed inside the grid.  
Public Property This event allows customization of Grid properties before rendering.  
Public Property Overrides the global culture and localization value for this component. Default global culture is 'en-US'.  
Public Property It used to render pager template  
Public Property Configures the pager in the Grid.  
Public Property Triggers after Grid data is exported to PDF document.  
Public Property Triggers before exporting each header cell to PDF document. You can also customize the PDF cells.  
Public Property Triggers before exporting each cell to PDF document. You can also customize the PDF cells.  
Public Property Triggers after print action is completed.  
Public Property Defines the print modes. The available print modes are `AllPages`: Prints all pages of the Grid. `CurrentPage`: Prints the current page of the Grid.  
Public Property Defines the external [`Query`](https://ej2.syncfusion.com/documentation/data/api-query.html) that will be executed along with data processing.  
Public Property Triggered every time a request is made to access cell information, element, or data. This will be triggered before the cell element is appended to the Grid element.  
Public Property Defines the relationship between parent and child datasource. It acts as the foreign key for parent datasource.  
Public Property Triggers when record is double clicked.  
Public Property Triggers when column resize starts.  
Public Property Triggers when column resize ends.  
Public Property Triggers on column resizing.  
Public Property Triggered every time a request is made to access row information, element, or data. This will be triggered before the row element is appended to the Grid element.  
Public Property Triggers when a selected row is deselected.  
Public Property Triggers before deselecting the selected row.  
Public Property Triggers when row elements are dragged (moved) continuously.  
Public Property Triggers when row element's drag(move) starts.  
Public Property Triggers when row element's before drag(move).  
Public Property Triggers when row elements are dropped on the target row.  
Public Property Configures the row drop settings.  
Public Property Defines the height of Grid rows.  
Public Property Triggers after a row is selected.  
Public Property Triggers before row selection occurs.  
Public Property The row template that renders customized rows from the given template. By default, Grid renders a table row for every data source item. > It accepts either [template string](../../common/template-engine/) or HTML element ID. > The row template must be a table row.  
Public Property Configures the search behavior in the Grid.  
Public Property The `selectedRowIndex` allows you to select a row at initial rendering. You can also get the currently selected row index.  
Public Property Configures the selection settings.  
Public Property If `showColumnChooser` is set to true, it allows you to dynamically show or hide columns.  
Public Property If `showColumnMenu` set to true, then it will enable the column menu options in each columns.  
Public Property Configures the sort settings.  
Public Property Configures the text wrap in the Grid.  
Public Property `toolbar` defines the ToolBar items of the Grid. It contains built-in and custom toolbar items. If a string value is assigned to the `toolbar` option, it is considered as the template for the whole Grid ToolBar. If an array value is assigned, it is considered as the list of built-in and custom toolbar items in the Grid's Toolbar. The following code example implements the custom toolbar items.  
Public Property Triggers when toolbar item is clicked.  
Public Property It used to render toolbar template  
Public Property Defines the Grid width.  
Top
Protected Properties
 NameDescription
Protected PropertyOverridden.   
Protected Property (Inherited from Syncfusion.EJ2.EJTagHelper)
Protected Property (Inherited from Syncfusion.EJ2.EJTagHelper)
Protected Property (Inherited from Syncfusion.EJ2.EJTagHelper)
Protected PropertyOverridden.   
Protected PropertyOverridden.   
Protected Property (Inherited from Syncfusion.EJ2.EJTagHelper)
Protected PropertyOverridden.   
Top
Public Methods
Protected Methods
 NameDescription
Protected Method (Inherited from Syncfusion.EJ2.EJTagHelper)
Protected Method (Inherited from Syncfusion.EJ2.EJTagHelper)
Top
Extension Methods
 NameDescription
Public Extension MethodOverloaded.  Iterates the index.
Top
See Also