Columns Menu

Some of the functionalities can be triggered from the column menu. Simply move your mouse cursor to the column header and the column menu button should appear. Clicking it should open a window with list of actions that can be done regarding selected column.

The features are:

  • sorting,
  • changing column order,
  • column management.
Example
menu.js
$('#jquery-columns-menu-grid').guiGrid({
	columns: [{
		header: 'Number',
		field: 'number',
		width: 120
	}, {
		header: 'Name',
		field: 'name',
		view: 'ITALIC'
	}, {
		header: 'Position',
		field: 'position',
		view: 'BOLD'
	}, {
		header: 'Team',
		field: 'team'
	}],
	columnMenu: {
		enabled: true,
		sort: true,
		columnsManager: true
	},
	sorting: {
		enabled: true,
		multiSorting: true
	},
	source: source
});


To configure column menu actions:

$('#jquery-columns-menu-grid').guiGrid({
	columns: [...],
	source: [...],
	
	columnMenu: {
		enabled: true,
		sort: true,
		columnsManager: true
	}
	
});

Column Menu - options

OptionsTypeDefaultDescription
enabled boolean false Turns on column menu.
sort boolean false Enabled sorting section
columnsManager boolean false Column management allows you to turn on / off column on the grid.

Related articles: