Home
SWOT Analysis
How Strong U R?
Articles
About Us
Oh Indian
In remembrance of the Independance day Aug 15, 2007
This site is dedicated to one and all who sincerely participated in freedom struggle. Let us try to fulfill their ambitions!
ASP.NET - Displaying only the required fields in Grid View
Eventhough we have a number of fields in the physical database table, for quite a many reasons, we want to display only a limited number of fields in the grid view. By default, when we assign the datasource and bind the control, the gridview displays all the fields in the output.
We need to use the following procedure to display only the required fields.
Open the Properties window using GridView Tasks menu and select Edit Menu.
See the following screenshot for your reference. Make sure to remove the tickmark of the Auto-Generate Columns.
Choose the type of column you want to display like BoundField, CheckBoxField etc. and click Add button.
Set the HeaderText and DataField properties.
Repeat the above procedures (3 & 4) to add any required fields to the gridview.
Make sure to assign the required datasource to the Gridview property through code. If you don't know how to do this, please refere to
Listing of Records in Grid View.
Run to view the result.
Comments from Users (0)
Leave a Reply
Name (Required)
Mail (will not be published) (required)
Website
SIM and Recharge Coupon Sales Software
|
tamil sangam
|
Income tax calculation
|
ip address search
|
online music store
|
TPTC Alumni Association
|
free text
|
motivational quotes
©Copyrights 2007 SoftHaands Software Services