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

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top