Titles
In FancyGrid there are title and subTitle.
Depending on needed complexity they can be just string value or configured objects.
Simple set text of title and subTitle
Example
title: 'Title',
subTitle: 'Sub Title',
Fast styling
Example
title: {
text: 'Title',
style: {
'text-align': 'center'
}
},
subTitle: {
title: 'Sub Title',
style: {
'text-align': 'center'
}
}
Fast styling over css classNames.
Example
title: {
text: 'Title',
cls: 'my-title'
},
subTitle: {
title: 'Sub Title',
cls: 'my-sub-title'
}
Title has action element - tools.
It allows to add buttons(links or other) in right side for actions.
Example
title: {
text: 'Title',
tools: [{
text: 'Alert',
handler: function(){
alert('This is alert');
}
},{
text: 'Hide',
handler: function(){
grid.hide();
}
}]
},