Bars
There are 4 bars in FancyGrid.
They are: tbar, subTBar bbar, buttons.
Syntax is the same for all bars.
The main purpose of buttons is alternative for bbar.
When paging is enabled, bbar is busy.
subTBar is used as extra bar for grid's top when
tbar is not enough.
Example
tbar: [{
type: 'button',
text: 'Add',
action: 'add'
},{
type: 'button',
text: 'Delete',
action: 'remove'
}],
Example: subTBar
tbar: [{
type: 'button',
text: 'Add',
action: 'add'
},{
type: 'button',
text: 'Delete',
action: 'remove'
}],
subTBar: [{
type: 'button',
text: 'Extra 1'
},{
type: 'button',
text: 'Extra 2'
}]
Example: separator
To set separator between items use shortcut |
bbar: [{
text: 'Text 1'
},'|',{
type: 'button'
}],
Example: side
If to set 'side' element than all elements after it will be floated to right side.
bbar: ['side', {
text: 'Clear'
},'|',{
type: 'Submit'
}],
Example: search field
tbar: [{
type: 'search',
width: 350,
emptyText: 'Search',
paramsMenu: true,
paramsText: 'Parameters'