newbie: GridView problem

J

Jeff

Hey

asp.net 2.0

I've got only one column in my GridView (see code below), but when I run
it... I see more columns in the GridView. These are the columns I see:
- UserName
- ProviderName
- IsOnlne
- LastPasswordChangedData
- PasswordQuestion
- IsLockedOut
- Comment
- UserName (again, but this time not as a buttonfield)
- Email
- CreationData
- IsApproved
- lastLockoutData
- LastLoginDate
- LastActivityDate

<asp:gridview ID="gvwUsers" runat="server">
<Columns>
<asp:ButtonField HeaderText="UserName" DataTextField="UserName" />
</Columns>
</asp:gridview>

private MembershipUserCollection allUsers = Membership.GetAllUsers();
protected void Page_Load(object sender, EventArgs e)
{
gvwUsers.DataSource = allUsers;
gvwUsers.DataBind();
}

I want only columns specified in the <Columns> section to be displayed.

What am I doing wrong here?

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top