Advertisement

07.02.2008 at 01:52PM PDT, ID: 23535094
[x]
Attachment Details

Dropdown in Gridview

Asked by ratkinso666 in Visual Studio .NET 2005, Programming for ASP.NET, .NET Framework 2.0

Tags: microsoft, Visual Studio, 2005, vb

Hi all, I am needing to put a dropdown in the edit portion of my gridview that is controlled by another field in the gridview.
ex:
custnum     dropdown 1  

dropdown 1 is a list of branches within that custnum, I want them to be able to select a branch for that custnum, but not sure how to do that within the gridview.  This is what I have so far and I think it is obvious what I am trying to do, just unsuccessfully..  I belive my control paramater needs to be something different...

<asp:TemplateField HeaderText="Branch 1" SortExpression="Branch1">
                <EditItemTemplate>
                    <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1"
                        DataTextField="Rh_BranchID" DataValueField="Rh_BranchID" SelectedValue='<%# Bind("Branch1") %>'>
                    </asp:DropDownList><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SQLRPTHCISDataConnectionString %>"
                        SelectCommand="SELECT DISTINCT [Rh_BranchID] FROM [ARHeader] WHERE ([Rh_CustomerNoWork] = @Rh_CustomerNoWork) ORDER BY [Rh_BranchID]">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="GridView1" Name="Rh_CustomerNoWork" PropertyName="SelectedValue"
                                Type="String" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("Branch1") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>

Thanks,
RandyStart Free Trial
[+][-]07.02.2008 at 02:01PM PDT, ID: 21920719

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 02:16PM PDT, ID: 21920823

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 02:17PM PDT, ID: 21920831

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.03.2008 at 04:21AM PDT, ID: 21924294

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.03.2008 at 05:50AM PDT, ID: 21924884

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.03.2008 at 05:55AM PDT, ID: 21924921

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.03.2008 at 06:12AM PDT, ID: 21925052

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.03.2008 at 06:17AM PDT, ID: 21925098

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.03.2008 at 06:35AM PDT, ID: 21925235

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.03.2008 at 06:37AM PDT, ID: 21925257

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.03.2008 at 06:42AM PDT, ID: 21925300

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.03.2008 at 06:48AM PDT, ID: 21925354

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 05:16AM PDT, ID: 21952979

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Visual Studio .NET 2005, Programming for ASP.NET, .NET Framework 2.0
Tags: microsoft, Visual Studio, 2005, vb
Sign Up Now!
Solution Provided By: ratkinso666
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07.08.2008 at 05:27AM PDT, ID: 21953073

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 06:55PM PDT, ID: 21960033

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07.09.2008 at 09:22AM PDT, ID: 21965441

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628