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

  • Home
  • SEARCH
  • 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 8001141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:00:44+00:00 2026-06-04T16:00:44+00:00

Afternoon All, I am used to using gridviews but i am using a a

  • 0

Afternoon All,

I am used to using gridviews but i am using a a details view for the first time. I am using Visual Studio 2010 with VB code.

I have a grid view that displays items from a database table and uses the ‘ShowSelectButton=”true”‘ function to enable users to select these individual items and display the full information within a details view.

The above works fine. The only issue that i have is my data is bound to the datasource and the associated database. On one of these columns i want to enable the users to select an item (Action Status and update – Outstaning, In-progress & Completed) in the form of a drop down list and then update it.

Im not too sue how to complete this? Here is my code for the details view….

        <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="400px" 
            AutoGenerateRows="False" 
            DataKeyNames="ActionID" DataSourceID="dsDetailsView" 
            AutoGenerateEditButton="True" CssClass="mGrid" PagerStyle-CssClass="pgr" 
            AlternatingRowStyle-CssClass="alt" HorizontalAlign="Center" 
            CellPadding="5" >
       <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
         <Fields>

           <asp:BoundField DataField="AgendaID" HeaderText="Agenda Ref:" 
            SortExpression="AgendaID"  ReadOnly="true">
             <HeaderStyle Font-Bold="True" Font-Names="Ariel" />
           </asp:BoundField>

           <asp:BoundField DataField="ActionID" HeaderText="Action ID:" 
            InsertVisible="False" ReadOnly="True" SortExpression="ActionID" 
            ItemStyle-Width="500px" >
             <HeaderStyle Font-Bold="True" />
             <ItemStyle Width="500px" Font-Bold="True"></ItemStyle>
           </asp:BoundField>

           <asp:BoundField DataField="Action" HeaderText="Action:" 
            SortExpression="Action" ReadOnly="true">
            <HeaderStyle Font-Bold="True" />
           <ItemStyle Wrap="True" />
           </asp:BoundField>

           <asp:BoundField DataField="Owner" HeaderText="Owner:" 
            SortExpression="Owner"  ReadOnly="true">
            <HeaderStyle Font-Bold="True" Wrap="False" />
            <ItemStyle Wrap="False" />
           </asp:BoundField>

           <asp:BoundField DataField="TargetDate" HeaderText="Target Date:" 
            SortExpression="TargetDate"  ReadOnly="true" 
            DataFormatString="{0:dd-MM-yyyy} " >
            <HeaderStyle Font-Bold="True" Wrap="True" />
            <ItemStyle Font-Bold="False" />
           </asp:BoundField>

           <asp:BoundField DataField="DateCreated" HeaderText="Date Created:" 
            SortExpression="DateCreated"  ReadOnly="true" 
            DataFormatString="{0:dd-MM-yyyy} " >
            <HeaderStyle Font-Bold="True" Wrap="False" />
           </asp:BoundField>

          <asp:BoundField DataField="ActionUpdate" HeaderText="Action Update:" 
            SortExpression="ActionUpdate" 
            NullDisplayText="Select 'Edit' to update Action..."  >
           <HeaderStyle Font-Bold="True" Wrap="False" />
          </asp:BoundField>

          <asp:BoundField DataField="ActionStatus" HeaderText="Action Status:" 
            SortExpression="ActionStatus"  ReadOnly="true" >
          <HeaderStyle Font-Bold="True" Wrap="False" />
          </asp:BoundField>

          <asp:BoundField DataField="ActionStatusID" HeaderText="Action Status ID:" 
            SortExpression="ActionStatusID"  ReadOnly="true" Visible="true">
            <HeaderStyle Font-Bold="True" Wrap="False" />
          </asp:BoundField>

     </Fields>
       <PagerStyle CssClass="pgr" />
</asp:DetailsView>

Any help in advance is much appriechiated.

Regards
Betty

  • 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-04T16:00:45+00:00Added an answer on June 4, 2026 at 4:00 pm

    You want to use a Templatefield, rather than a BoundField for “ActionStatus” to accomplish this.

    You can use the designer to convert the field to a TemplateField as follows:

    • Expand the grey arrow in the corner of your DetailsView (I can’t remember what it’s called), then
    • Click on “Edit Fields.”
    • In the “Selected Fields” box, click on the field you want to change (“ActionStatus”, in your case).
    • In the lower right-hand portion of the window, click the link that says “Convert this field into a TemplateField”

    Then you need to go to your markup (the source view) and change the <EditItemTemplate> section so it has a DropDownList inside it. Like this:

    <asp:TemplateField HeaderText="ActionStatus" 
        SortExpression="ActionStatus">
        <EditItemTemplate>
            <asp:DropdownList ID="actionStatusDDL" runat="server">
                <asp:ListItem Text="Outstanding" Value="Outstanding"></asp:ListItem>
                <asp:ListItem Text="In Progress" Value="In Progress"></asp:ListItem>
                <asp:ListItem Text="Completed" Value="Completed"></asp:ListItem>
            </asp:DropdownList>
        </EditItemTemplate>
    

    You will also need to make sure that your DataSource has a “UpdateCommand” configured in order for the update to work properly.

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

Sidebar

Related Questions

Afternoon All, I am using a visual studio 2010. I have a web page
Afternoon all, Using the code below I'm trying to load what is render by
Good afternoon all, I'm using a java.lang.StringBuilder to store some characters. I have no
This seems to have happened at some point this afternoon. First of all, my
I have tried all afternoon to import some products in Magento, but all without
Good Afternoon All, I have two tables in my SQL Server 2005 DB, Main
Good afternoon all, I have a Java applet that I wish to embed on
I have been trying all afternoon to get the jQuery Sifr Plugin ( http://jquery.thewikies.com/sifr/
Good afternoon, all. I'm not too hopeful for a yes here, but if anyone
Friday afternoon and all but hope that different timezones will help me with this...

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.