Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8210405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:03:52+00:00 2026-06-07T10:03:52+00:00

<div style=width:100%; height:200px; overflow:scroll; border-color:White;> <asp:GridView ID=UsersGridView runat=server CssClass=label ShowHeaderWhenEmpty=True Width=100% AllowSorting=True HeaderStyle-BackColor=LightGray CellPadding=4

  • 0
<div style="width:100%; height:200px; overflow:scroll; border-color:White;">
        <asp:GridView ID="UsersGridView" runat="server" 
            CssClass="label" ShowHeaderWhenEmpty="True" Width="100%" 
            AllowSorting="True" HeaderStyle-BackColor="LightGray" CellPadding="4" 
            ForeColor="#333333" GridLines="None" DataSourceID="UsersDataSource" >
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:BoundField HeaderText="Fleet Description" ReadOnly="True" 
                    HeaderStyle-Wrap="false" HtmlEncode="True" >
                    <HeaderStyle Wrap="False"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField DataField="Fleet Code" HeaderText="Fleet Code" ReadOnly="True" 
                    HeaderStyle-Wrap="false" >
                    <HeaderStyle Wrap="False"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField DataField="First Name" HeaderText="First Name" ReadOnly="True" 
                    HeaderStyle-Wrap="false" >
                    <HeaderStyle Wrap="False"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField DataField="Last Name" HeaderText="Last Name" ReadOnly="True" 
                    HeaderStyle-Wrap="false" >
                    <HeaderStyle Wrap="False"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField DataField="Username" HeaderText="User Name" ReadOnly="True" 
                    HeaderStyle-Wrap="false" >
                    <HeaderStyle Wrap="False"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField DataField="Email" HeaderText="Email" ReadOnly="True" 
                    HeaderStyle-Wrap="false" >
                    <HeaderStyle Wrap="False"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField DataField="Phone" HeaderText="Phone" ReadOnly="True" 
                    HeaderStyle-Wrap="false" >
                    <HeaderStyle Wrap="False"></HeaderStyle>
                </asp:BoundField>
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />

            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White"></HeaderStyle>
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
        <asp:SqlDataSource ID="UsersDataSource" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" 
            SelectCommand="SELECT        UserDataAssociation.Fleet as &quot;Fleet Code&quot;, UserDataAssociation.FirstName as &quot;First Name&quot;, UserDataAssociation.LastName as &quot;Last Name&quot;, aspnet_Users.UserName, aspnet_Membership.Email, 
                     UserDataAssociation.Phone
FROM            aspnet_Membership INNER JOIN
                     aspnet_Users ON aspnet_Membership.UserId = aspnet_Users.UserId INNER JOIN
                     UserDataAssociation ON aspnet_Membership.UserId = UserDataAssociation.UserId"></asp:SqlDataSource>
    </div>

I have this gridview for the sqldatasource with a select statement. However when the page is loaded, the gridview has double its original columns, created by the datasource. I would like that not to be the case obviously.

What am I doing wrong?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T10:03:53+00:00Added an answer on June 7, 2026 at 10:03 am

    Set the Gridview AutoGenerateColumns property to False

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From line: < div style=left:0px; top:0px; width:100%; height:63px; border-style: solid; border-width: 1px; background-color:#FCF0C4; border-color:#E87511;
My navigation panel currently has the following attributes: <div id='navpanel' style='float:left; width:300px; height:100%; overflow:hidden;
I have a page with a Google Maps div: <div id=map_canvas style=width: 100%; height:
I have the following <div id=border style=width:100%; border:8px solid #FFF> <div id=menu style=width:250px; float:left;
<style type=text/css> div#foo { background: #0000ff; width: 200px; height: 200px; opacity: 0.30; filter: alpha(opacity
Try this showcase: <!doctype html> <html> <head> <style> html { min-height: 100%; overflow-y: scroll;
<html> <head></head> <body> <div id=ctl00_ContentPlaceHolder1_ctl00_ctl01_Showcase> <div style=width:100%;text-align:center;><img src=http://www.xyz.com/aaa.gif id=ctl00_ContentPlaceHolder1_ctl00_ctl01_loderImg alt=Loading /></div> </div> <script> q=
Here is my code i am using for custom search, <div id=cse-search-form style=width: 100%;>Loading</div>
To understand what I mean, please see this snippet: <table style=width: 100%> <tbody><tr><td> <div
I have a div[class=container] and inside is div[class=item] like: <style type=text/css> .container{ height:50vh; width:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.