Wijmo UI for the Web
wijgrid jQuery Widget
Interactively select, edit, sort, scroll through, filter, and group data to better understand and visualize it more effectively.
Syntax
$(function () {
    var options; // Type:  wijmo.grid.wijgrid.options
     
    $(".selector").wijgrid(options);
});
function wijgrid() : any;
Remarks
WijGrid IColumn also provides options that you can use to change the behavior of your grid's columns.
Options
 NameDescription
public Option

Determines whether end users can drag and drop to reorder columns.

Default value: false

Type: Boolean

 

 
public Option

Determines whether the user can drag a sizing handle at the edge of the column header to change the width of the column.

Default value: false

Type: Boolean

 
public Option

Determines whether the user can make changes to cell contents in the grid.

This option is obsolete. Use the editingMode option instead.

Default value: false

Type: Boolean

 
public Option

Determines whether the user can change the current cell using the keyboard arrow keys.

Default value: true

Type: Boolean

 
public Option

Determines whether the grid displays paging buttons that allow the user to navigate between pages of data. Set the number of rows of data on each page using the pageSize option.

Default value: false

Type: Boolean

 

 
public Option

Determines whether users can sort data in the grid by clicking a column header.

Default value: false

Type: Boolean

 
public Option

Indicate whether to enable the virtual scrolling feature. To improve efficiency, set this option to true when using large amounts of data without paging. Obsoleted, use the scrollingSettings.virtualization.mode option instead.

Default value: false

Type: Boolean

 

 
public Option

Default value: null

A value that indicates calendar's options in grid. It works for calendar in inputdate.

 
public Option

Creates a function that is called each time wijgrid changes a cell's appearance, for example, when the current cell position changes or a cell is selected. Use it to customize a cell's style depending on its state.

Default value: undefined

Type: Function

 
public Option

An array of column objects.

Default value: []

Type: wijmo.grid.IColumn[]

 

 
public Option

Determines the behavior for column autogeneration.

Default value: merge

Type: String (see valid values below)

 
public Option

Determines the culture ID to use in rendering the grid. You must include a reference to the globalize.culture file that matches the culture ID you use in order for this option to take effect. See Localization and Globalization for more information.

Default value: ""

Type: String

 
public Option

A value that indicates the culture calendar to use in formatting dates in the grid. This option must match the value used in the culture option.

Default value: ""

Type: String

 
public Option

Type: wijmo.grid.IFilterOperator[]

Default value: []

An array of custom user filters. Use this option if you want to extend the default set of filter operators with your own. Custom filters will be shown in the filter dropdown.

 
public Option

Default value: null

Determines the datasource. Possible datasources include: 1. A DOM table. This is the default datasource, used if the data option is null. Table must have no cells with rowSpan and colSpan attributes. 2. A two-dimensional array, such as [[0, "a"], [1, "b"]]. 3. An array of objects, such as [{field0: 0, field1: "a"}, {field0: 1, field1: "b'}]. 4. A wijdatasource. 5. A wijdataview.

 
public Option

Type: wijmo.grid.IDetailSettings

Determines the detail grid settings in a hierarchy grid, which is used as a template for populating detail grids in a hierarchical grid.

 
public Option

Default value: 'auto'

Determines an action to bring a cell in the editing mode when the editingMode option is set to "cell". Possible values are: "click", "doubleClick", "auto".

 
public Option

Default value: 'none'

Determines the editing mode. Possible values are: "none", "row", "cell",

 
public Option

Default value: false

Determines if the exact column width, in pixels, is used.

 
public Option

Default value: 'alphabeticalCustomFirst'

Determines the order of items in the filter drop-down list. Possible values are: "none", "alphabetical", "alphabeticalCustomFirst" and "alphabeticalEmbeddedFirst"

 
public Option

Determines whether the user can change position of the static column or row by dragging the vertical or horizontal freezing handle with the mouse. Possible values are: "none", "columns", "rows", "both". Obsoleted, use the scrollingSettings.freezingMode property instead.

 
public Option

Sets the text to display in the the group area.

Default value: 'Drag a column here to group by that column.'

Type: String

 

 
public Option

Default value: 10

Determines the indentation of the groups, in pixels.

 
public Option

Default value: false

Determines whether the position of the current cell is highlighted or not.

 
public Option

Default value: true

Determines whether hovered row is highlighted or not.

 
public Option

Default value: 'moveAcross'

Determines the action to be performed when the user presses the TAB key.

 
public Option

Default value: 'Loading...'

Determines the text to be displayed when the grid is loading.

 
public Option

Default value: ""

Cell values equal to this property value are considered null values. Use this option if you want to change default representation of null values (empty strings) with something else.

 
public Option

Determines the zero-based index of the current page. Use this option to display a specific page of records when using the paging feature.

Default value: 0

Type: number

 

 
public Option

Determines the pager settings for the grid including the mode (page buttons, or next and previous buttons), the number of page buttons, and the position where the buttons appear.

Default:

{mode: "numeric", pageButtonCount: 10, position: "bottom"}

Type: wijmo.grid.IPagerSettings object

 
public Option

Specify the number of rows to place on a single page when allowPaging is set to true.

Default value: 10

Type: number

 

 
public Option

Default value: false

A value indicating whether DOM cell attributes can be passed within a data value.

 
public Option

Determines the height of a rows when virtual scrolling is used. Obsoleted, use the scrollingSettings.virtualization.rowHeight property instead.

 
public Option

Function used for styling rows in wijgrid.

 
public Option

Type: wijmo.grid.IScrollingSettings

Determines the scrolling settings.

 
public Option

Determines which scrollbars are active and if they appear automatically based on content size. Possbile values are: "none", "auto", "horizontal", "vertical", "both". Obsoleted, use the scrollingSettings.mode property instead.

 
public Option

Default value: singleRow

Determines how many cells, ranges of cells, columns, or rows can be selected at one time.

Valid values:

  • none Selection is turned off.
  • singleCell A single cell can be selected.
  • singleColumn A single column can be selected.
  • singleRow A single row can be selected.
  • singleRange A single range of cells can be selected.
  • multiColumn More than one column can be selected at the same time using the mouse and the CTRL or SHIFT keys.
  • multiRow More than one row can be selected at the same time using the mouse and the CTRL or SHIFT keys.
  • multiRange More than one range of cells can be selected at the same time using the mouse and the CTRL or SHIFT keys.
 
public Option

Default value: false

A value indicating whether the filter row is visible. Filter row is used to display column filtering interface.

 
public Option

Default value: false

A value indicating whether the footer row is visible. Footer row is used for displaying of tfoot section of original table, and to show totals.

 
public Option

Default value: false

A value indicating whether group area is visible. Group area is used to display headers of groupped columns. User can drag columns from/to group area by dragging column headers with mouse, if allowColMoving option is on.

 
public Option

Default value: false

A value indicating whether the row header is visible.

 
public Option

Default value: true

A value indicating whether a selection will be automatically displayed at the current cell position when the wijgrid is rendered. Set this option to false if you want to prevent wijgrid from selecting the currentCell automatically.

 
public Option

Indicates the index of columns that will always be shown on the left when the grid view is scrolled horizontally. Obsoleted, use the scrollingSettings.staticColumnIndex property instead.

 
public Option

Gets or sets the alignment of the static columns area. Possible values are "left", "right". Obsoleted, use the scrollingSettings.staticColumnsAlignment property instead.

 
public Option

Indicates the index of data rows that will always be shown on the top when the wijgrid is scrolled vertically. Obsoleted, use the scrollingSettings.staticRowIndext property instead.

 
public Option

Default value: -1

Gets or sets the virtual number of items in the wijgrid and enables custom paging. Setting option to a positive value activates custom paging, the number of displayed rows and the total number of pages will be determined by the totalRows and pageSize values.

 
Top
Methods
 NameDescription
public MethodPuts the current cell into edit mode, as long as the editingMode options is set to "cell".  
public MethodDiscards changes and finishes editing of the edited row.  
public Method
   </> Summary (Javascript source comments)
Returns a one-dimensional array of widgets bound to visible column headers.  
public MethodSets the current cell for the grid.  
public MethodGets an array of underlying data.  
public MethodGets an underlying wijdataview instance.  
public MethodDeletes the specified row.  
public Method  
public MethodReturns an array which consists of hierarchy nodes in wijgrid.  
public MethodRe-renders wijgrid.  
public MethodStarts editing of the specified row, can only be used when the editingMode option is set to "row".  
public MethodFinishes editing the current cell.  
public MethodMoves the column widget options to the wijgrid options and renders the wijgrid. Use this method when you need to re-render the wijgrid and reload remote data from the datasource.  
public MethodExports the grid to a specified format. The export method only works when wijmo.exporter.gridExport's reference is on the page.  
public MethodGets an instance of the wijmo.grid.cellInfo class that represents the grid's specified cell.  
public MethodReturns a one-dimensional array of filter operators which are applicable to the specified data type.  
public MethodGets the number of pages.  
public MethodGets an object that manages selection in the grid.  
public MethodSets the size of the grid using the width and height parameters.  
public MethodFinishes editing and updates the datasource.  
public MethodReturns a jQuery object containing the original element or other relevant generated element.  
Top
Events
 NameDescription
public EventThe afterCellEdit event handler is a function called after cell editing is completed. This function can assist you in completing many tasks, such as in making changes once editing is completed; in tracking changes in cells, columns, or rows; or in integrating custom editing functions on the front end.  
public EventThe afterCellUpdate event handler is a function that is called after a cell has been updated. Among other functions, this event allows you to track and store the indices of changed rows or columns.  
public EventThe beforeCellEdit event handler is a function that is called before a cell enters edit mode. The beforeCellEdit event handler assists you in appending a widget, data, or other item to a wijgrid's cells before the cells enter edit mode. This event is cancellable if the editigMode options is set to "cell".  
public EventThe beforeCellUpdate event handler is a function that is called before the cell is updated with new or user-entered data. This event is cancellable if the editingMode options is set to "cell". There are many instances where this event is helpful, such as when you need to check a cell's value before the update occurs or when you need to apply an alert message based on the cell's value.  
public EventThe cellClicked event handler is a function that is called when a cell is clicked. You can use this event to get information about a clicked cell using the args parameter.  
public EventThe columnDragged event handler is a function that is called when column dragging has been started. You can use this event to find the column being dragged or the dragged column's location.  
public EventThe columnDragging event handler is a function that is called when column dragging has been started, but before the wijgrid handles the operation. This event is cancellable.  
public EventThe columnDropped event handler is a function that is called when a column has been dropped into the columns area.  
public EventThe columnDropping event handler is a function that is called when a column is dropped into the columns area, but before wijgrid handles the operation. This event is cancellable.  
public EventThe columnGrouped event handler is a function that is called when a column has been dropped into the group area.  
public EventThe columnGrouping event handler is a function that is called when a column is dropped into the group area, but before the wijgrid handles the operation. This event is cancellable.  
public EventThe columnResized event handler is called when a user has changed a column's size.  
public EventThe columnResizing event handler is called when a user resizes the column but before the wijgrid handles the operation. This event is cancellable.  
public EventThe columnUngrouped event handler is called when a column has been removed from the group area.  
public EventThe columnUngrouping event handler is called when a column has been removed from the group area but before the wjgrid handles the operation. This event is cancellable.  
public EventThe currentCellChanged event handler is called after the current cell is changed.  
public EventThe currentCellChanging event handler is called before the cell is changed. You can use this event to get a selected row or column or to get a data row bound to the current cell. This event is cancellable.  
public EventThe dataLoaded event handler is a function that is called when data is loaded.  
public EventThe dataLoading event handler is a function that is called when the wijgrid loads a portion of data from the underlying datasource. This can be used for modification of data sent to server if using dynamic remote wijdatasource.  
public EventThe detailCreating event handler is called when wijgrid requires to create a new detail wijgrid.  
public EventThe filtered event handler is a function that is called after the wijgrid is filtered.  
public EventThe filtering event handler is a function that is called before the filtering operation is started. For example, you can use this event to change a filtering condition before a filter will be applied to the data. This event is cancellable.  
public EventThe filterOperatorsListShowing event handler is a function that is called before the filter drop-down list is shown. You can use this event to customize the list of filter operators for your users.  
public EventThe groupAggregate event handler is a function that is called when groups are being created and the column object's aggregate option has been set to "custom". This event is useful when you want to calculate custom aggregate values.  
public EventThe groupText event handler is a function that is called when groups are being created and the groupInfo option has the groupInfo.headerText or the groupInfo.footerText options set to "custom". This event can be used to customize group headers and group footers.  
public EventThe invalidCellValue event handler is a function called when a cell needs to start updating but the cell value is invalid. So if the value in a wijgrid cell cannot be converted to the column target type, the invalidCellValue event is raised.  
public EventThe loaded event handler is a function that is called at the end the wijgrid's lifecycle when wijgrid is filled with data and rendered. You can use this event to manipulate the grid html content or to finish a custom load indication.  
public EventThe loading event handler is a function that is called at the beginning of the wijgrid's lifecycle. You can use this event to activate a custom load progress indicator.  
public EventThe pageIndexChanged event handler is a function that is called after the page index is changed, such as when you use the numeric buttons to swtich between pages or assign a new value to the pageIndex option.  
public EventThe pageIndexChanging event handler is a function that is called before the page index is changed. This event is cancellable.  
public EventThe rendered event handler is a function that is called when the wijgrid is rendered. Normally you do not need to use this event.  
public EventThe rendering event handler is a function that is called when the wijgrid is about to render. Normally you do not need to use this event.  
public EventThe selectionChanged event handler is a function that is called after the selection is changed.  
public EventThe sorted event handler is a function that is called after the widget is sorted. The allowSorting option must be set to "true" to allow this event to raise.  
public EventThe sorting event handler is a function that is called before the sorting operation is started. This event is cancellable. The allowSorting option must be set to "true" for this event to raise.  
Top
See Also

Widgets

Grid

Reference

wijgrid jQuery Widget