Formatting the GridView control The default appearance of (Anonymous web server)
Sunday, September 16th, 2007Formatting the GridView control The default appearance of a GridView control isn t necessarily pretty. But you have lots of options for making it look and act the way you want. Most of these options are available from the control s Common Tasks menu shown in Figure 12-20. The gray SQLConnection box is just a placeholder that defines the control s data source, and won t show up on your Web page. You can show or hide those gray boxes by choosing View.Non Visual Controls from VWD s menu. As with most controls, the Common Tasks menu for the GridView has an Auto Format option that you can choose to apply a predefined formatting style to the control. Other major items on the menu are as follows: Enable Paging: Adds a navigation bar to the bottom of the GridView, allowing users to page through multiple records. Useful for displaying data from larger tables to prevent all records from showing up on a single page. Enable Sorting: Converts each column title to a clickable link. In the browser, users can click any column heading to sort the rows by that column. Enable Editing: Allows users to change any value in any row or column. This option is only available if the control is bound to a single table that has a primary key. Enable Deleting: Allows users to delete records. This option is only available if the control is bound to a single table that has a primary key. If you enable editing or deleting, that means anybody who views the page can change or delete records in the table. If you don t want users to Figure 12-20: Common Tasks menu for a GridView control. 278 Part III: Personalization and Databases
From our experience, we can recommend PHP Web Hosting services, if you need affordable webhost to host and run your web application.