Data Grid - Dynamic Toolbar Display

This example shows how to dynamically add objects to a tool bar, as well as how to display or hide it. Click the buttons to add objects to the tool bar. Click the checkbox to hide or display the tool bar.

myDataGrid.showToolbar();
When called with no parameters, a grey rectangle is displayed. This command also accepts parameters, ['search'], ['deleterecords'], and ['createrecord']. On this example page, this command is called in the function SetToolbar(par).

myDataGrid.showToolbar(['search']);
On this page, an on click event of the button "search" calls the function SetToolbar(par) which executes the above command to display the search toolbar object.

myDataGrid.showToolbar(['deleterecords']);
On this page, an on click event of the button "delete" calls the function SetToolbar(par) which executes the above command to display the delete toolbar object (-).

myDataGrid.showToolbar(['createrecord']);
On this page, an on click event of the button "create" calls the function SetToolbar(par) which executes the above command to display the create toolbar object (+).

Note: This command can be used to display each object individually. To display all the objects at once, execute: myDataGrid.showToolbar(['createrecord','deleterecords','search']);

myDataGrid.hideToolbar();
This command accepts no parameters. An on click event of the check box "Hide Tool Bar" calls the function SetToolbar(par) which executes the above command to hide the toolbar.