Core Properties
bbar
ArrayBottom bar.
bbar: [{
type: 'button',
text: 'Text',
handler: function(){}
}],
buttons
ArrayButtons bar
buttons: [{
type: 'button',
text: 'Text',
handler: function(){}
}],
defaults
ObjectColumns default properties.
defaults: {
type: 'string',
width: 100,
editable: true,
sortable: true
},
draggable
BooleanIf window
param is true than draggable enables dragging of element over header.
var grid = new FancyGrid({
window: true,
modal: true,
draggable: true,
...
});
grid.show();
events
ArrayForm event handlers.
var form = new FancyForm({
...
events: [{
change: function(o){
},
scope: {}// not required
}]
...
});
footer
ObjectFooter bar.
var form = new FancyForm({
...
footer: {
status: '* - Devices online per 100 inhabitants in 2015',
source: {
text: 'OECD',
link: 'oecd.org'
}
},
...
});
height
MixedForm height.
If value is 'fit'
, height will be set to content.
height: 500,
height: 'fit',
id
StringThere are several ways to get link on grid object.
One of which is to set id
and than to use Fancy.getWidget('myForm')
.
new FancyForm({
id: 'myForm'
});
...
var form = Fancy.getWidget('myForm');
i18n
StringLocalization.
var Form = new FancyForm({
title: 'Localization - German',
i18n: 'ge',
...
});
lang
ObjectLocalization.
var form = new FancyForm({
title: 'Localization - German',
lang: {
paging: {
of: 'von [0]',
info: 'Zeilen [0] - [1] von [2]'
}
}
...
});
method
StringThe request method to use for form actions.
var form = new FancyForm({
...
url: 'submit.php',
params: {
param1: 1,
param2: 'string'
},
method: 'POST',
...
});
modal
BooleanIt enables modal for grid.
It requires do not define renderTo and set window.
var grid = new FancyForm({
window: true,
modal: true,
....
});
grid.show();
params
ObjectExtra form params for request.
var form = new FancyForm({
...
url: 'submit.php',
params: {
param1: 1,
param2: 'string'
},
method: 'POST',
...
});
renderTo
StringDom id, where to render form.
new FancyForm({
renderTo: 'container',
width: 690,
height: 350,
...
shadow
BooleanEnable light shadow.
new FancyForm({
renderTo: 'container',
width: 690,
height: 350,
shadow: false,
...
tbar
ArrayToolbar.
tbar: [{
type: 'button',
text: 'Add',
action: 'add'
}],
title
StringForm title text.
title: 'Form of statistics',
theme
StringIf you defined new theme, than property theme will enable it for form.
theme: 'my'
url
StringThe URL to use for form actions.
var form = new FancyForm({
...
url: 'submit.php',
params: {
param1: 1,
param2: 'string'
},
method: 'POST',
...
});
width
MixedForm width.
If width is not set than form width become responsive.
If value is 'fit'
, width will be set to content.
width: 400,
height: 'fit',
window
BooleanThis param is used if grid is hidden on start and should be shown later.
It does grid positioned absolute.
It requires do not define renderTo
.
var grid = new FancyForm({
window: true,
modal: true,
....
});
grid.show();