Simply follow the scenario below.
1. Drag a GridView control to the page.
2. Assign the Object list into the grid as below.
// c# - Bind data to the drop down
GridView1.DataSource = userList;
GridView1.DataBind();
3. Run the application. That's all.
If you need to show only few columns, do the following.
1. Go to GridView Properties.
2. Open the "columns" property.
3. Uncheck the check box "Auto-Generate fields".
4. Add any type of fields and set the "DataField" to a property in your object for the selected field. For example "UserName".
Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts
Thursday, July 19, 2007
Subscribe to:
Posts (Atom)