Solo disponible en BuenasTareas
  • Páginas : 12 (2860 palabras )
  • Descarga(s) : 0
  • Publicado : 20 de junio de 2011
Leer documento completo
Vista previa del texto

DataGrid tool
This tool has been created for selecting data, displaying it as a grid, and perform routine operations on it. It allows paging through results, editing, deleting and inserting new data. DataGrid reads its interface from a template file with the help of Template class and utilizes DB class to access database. Fields of DataGrid are derived from DataGridColumn so, when you needdisplaying complex data with an extra-ordinary interface, you just need to derive a new class and implement Init, Render, RenderEdit, and GetValue functions. You can also register toolbar commands which has their own callback functions. DataGrid allows to add command columns, when you click on that commands, it will call the callback function which you have specified and will pass the KeyFieldvalue, in turn allowing you to perform any needed operations. In addition to it, you register your own toolbar commands very easily. See DataGrid::RegisterToolbarCommand() for more information. If you manipulate a complex data you can handle OnInsert, OnEdit, OnUpdate, OnDelete events and perform your own operation, then let the DataGrid to continue its procedure or not. See OnInsertCall(),OnEditCall(), OnUpdateCall(), OnDeleteCall() methods. DataGrid is almost fully customizable. You can customize its functionality, its interface, its columns and commands, and create a new column types etc. For example, you can select only identifier from necessary table, create a special Column type which will using this ID display for you News, Archive materials, etc. As a result you benefit from itsPaging functionality at least.

This is the main class to display data and act as a grid. This class utilized multiple global functions, DB class, Template class, DataGridColumn and its derived type, DataGridToolbarCommand classes. Its gathers data, displays, reacts against multiple post back commands. DataGrid saves its state across multiple post backs

DataGrid class

An instanceof Template class. This template carries the design interface of DataGrid. If you want to use a different template construct the class with a different template file name, or after construction provide a ready to use template instance This property is needed for insert operation. If you have a key field that needs to be atomically incremented by the DataGrid set this property to true (defaultvalue). When this is true, and the key field if not displayed to users, DataGrid automatically increments this field and Creates the insert SQL. If you set it to false, and when this field is not displayed to users, data grid will not automatically increment the key field. If the key field is displayed to users, this property doesn’t play any role If this property is set to true, “Cancel Sort” toolbarcommand will be rendered to the user. See the CancelSorting() function for more information





If this is set to true, the “Delete” link will be rendered next to each row. If this is set to true, the “Delete Selected” button will be rendered on the toolbar to enable users to delete selected rows all by one click If this is setto true, an “Edit” link will be rendered next to each row to enable users edit that row If this is set to true, a special row will be rendered to user at the bottom of table in edit more, to enable users to insert new rows. If you are working with a complex data and wont to handle insert commands, see the OnInsertCall() function





If this is set to true, data grid will automatically page the results of select statement. And a pager will be rendered to users to enable them to switch through pages If this property is set to true checkboxes will be rendered to the left of each row allowing users to select rows If this is set to true, Data Grid will enable users to automatically sort the fields. If you want to enable...
tracking img