If your GridView supports editing, deleting, or selecting, (Web site construction)
If your GridView supports editing, deleting, or selecting, the Selected Fields list will include an item named CommandField. That item represents the leftmost column in the table where Edit, Delete, and Select links are placed. If you don t want a particular column to show up in the GridView, just remove its name from the list of Selected Fields. For example, I could remove the ItemId field from the current GridView control by clicking ItemId in the Selected Fields list and then clicking the black X button just to the right of the list. When you ve finished formatting fields in the Fields dialog box, click OK to save your changes and return to the page. To get an accurate picture of how your selections will play out, be sure to view the page in a Web browser. Styling the whole GridView You can style the GridView, as a whole, much as you would any other item. Right-click the control, choose Style, and use the Style Builder to define the style. You can also style the control via its Properties sheet. The Properties sheet for GridView provides extremely fine-grained control over the exact appearance and behavior of every GridView nook and cranny. For example, if you ve enabled Paging in your control and want to set the number of rows that appear on each page, change the PageSize property under Paging to however many records you want each page to show. If you want to apply a consistent look and feel to GridView controls used throughout your site, consider creating a CSS class. For example, you could create a CSS style rule named GView that looks like this: .GView { border-right: #191970 thin solid; border-top: #191970 thin solid; font-size: smaller; border-left: #191970 thin solid; color: #483d8b; border-bottom: #191970 thin solid; border-collapse: collapse; background-color: #f0f8ff; } Binding to DropDownList Controls Even though a DropDownList control isn t a data control, per se, you can bind data from a database to that control. This is especially useful when the 280 Part III: Personalization and Databases
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.