In this tutorial we will display only the columns that we want our users to see. This tutorial assumes that you've created a GridView with the "*" selected on the "Northwind", "Products" table.
1. Click on the ">" icon on the right hand side of the GridView control, the "GridView Tasks" panel will appear
2. Click on the "Edit Columns" link
3. Select the "SupplierID" field in the "Selected fields" list box then click on the "X" button
4. Select the "CategoryID" field in the "Selected fields" list box then click on the "X" button
5. Select the "ProductID" field in the "Selected fields" list box then click on the "X" button
6. Now the "Selected fields" will have not have the "ProductID,CategoryID,SupplierID". The remaining fields are the fields that will be displayed on the GridView. Noticed the "Available Fields" list box, it still contain all the fields that you've selected. That means you can perform functions on those fields, the fields just won't be displayed anymore.
8. As you can see the GridView only has the fields that you've selected in the "Selected fields" list box
No comments:
Post a Comment