Each pane has its own editing toolbar. The Xbasic Functions and Server-side Events toolbars include a Check Syntax button for Xbasic. All four toolbars have buttons for cut, copy, paste, undo, redo, find, replace, indent, outdent, left align, format code, transform code, comment out, and un-comment out.
The Code section provides access to the following places where code can be added:
- Server-side Events
- Client-side Events
- Xbasic Functions
The Server-side Events code pane lists server-side events for the Grid. Custom Xbasic can be added to these events to do things such as data validation, calculate field values (such as timestamps or record IDs), set session variables, etc. See Grid Server-side Events for more information about these events.
The Xbasic Functions section allows you to define Xbasic functions that can be called from Xbasic event handlers. These functions are called by server side actions defined in the grid 'Events' (see Grid Server-side Events and Ajax Callbacks.)
The 'e' pointer variable used in most event handlers may carry different properties for different handlers. The function prototype for each event handler contains comments that explain the properties for that handler and show a typical implementation of that handler.
Further information in the properties carried by the 'e' pointer variable for a specific handler on a specific grid may be obtained by debugging the event handler and inspecting the 'e' variable.