Is a 3 nested dropdpwnlist achievable?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rote

    Is a 3 nested dropdpwnlist achievable?

    I have a 3 dropdownlist and a gridview to display..
    What i want is if i load the page i want all the dropdownlist and the
    Gridview to get populated and linked on the fly.

    But my problem now is when i load the page i want all the dropdownlist
    should be populated and linked automatically.
    but it doesn't .The first 2 works the last dropdownlist is empty and the
    gridview shows nothing..
    Any ideas what 'm doing wrong?

    All the 3 dropdownlist are linked like so below
    <table>

    <p>

    <tr>

    <td>

    Select a Dealer

    </td>

    <td>

    <asp:DropDownLi st ID="ddlDealer" runat="server" AutoPostBack="T rue"
    DataSourceID="S qlDataSource4"

    DataTextField=" dealer" DataValueField= "dealer">

    </asp:DropDownLis t>

    <asp:Label ID="Label1" runat="server"> </asp:Label>

    <asp:SqlDataSou rce ID="SqlDataSour ce4" runat="server" ConnectionStrin g="<%$
    ConnectionStrin gs:cn %>"

    SelectCommand=" spGetDealer"
    SelectCommandTy pe="StoredProce dure"></asp:SqlDataSour ce>

    </td>

    </tr>



    <tr>

    <td>

    Select a Master Code

    </td>

    <td>

    <asp:DropDownLi st ID="ddlMaster" runat="server"
    DataSourceID="S qlDataSource1" DataTextField=" Master_Code"

    DataValueField= "mc_id"
    OnSelectedIndex Changed="ddlMas ter_SelectedInd exChanged"

    AutoPostBack="t rue">

    </asp:DropDownLis t>


    <asp:SqlDataSou rce ID="SqlDataSour ce1" runat="server" ConnectionStrin g="<%$
    ConnectionStrin gs:cn %>"

    SelectCommand="[spGetAllSchedul eMaster]"
    SelectCommandTy pe="StoredProce dure">

    <SelectParamete rs>

    <asp:ControlPar ameter ControlID="ddlD ealer" Name="dealer"
    PropertyName="S electedValue"

    Type="string" />

    </SelectParameter s>

    </asp:SqlDataSour ce>

    </td>

    </tr>


    <tr>

    <td>

    Select a Plan Value

    </td>

    <td>

    <asp:DropDownLi st ID="ddlPlans" runat="server" AutoPostBack="T rue"
    DataSourceID="S qlDataSource2"

    DataTextField=" Plan Code" DataValueField= "plan_id"
    OnDataBound="dd lPlans_DataBoun d">

    </asp:DropDownLis t>


    <asp:SqlDataSou rce ID="SqlDataSour ce2" runat="server" ConnectionStrin g="<%$
    ConnectionStrin gs:cn %>"

    SelectCommand=" spGetPlanValues ByID" SelectCommandTy pe="StoredProce dure">

    <SelectParamete rs>

    <asp:ControlPar ameter ControlID="ddlM aster" Name="mc_id"
    PropertyName="S electedValue"

    Type="Int32" />

    </SelectParameter s>

    </asp:SqlDataSour ce>

    </td>

    </tr>

    </table>


Working...