locked
Retaining the size of Drop Down List RRS feed

  • Question

  • I have 2 drop down lists. When i select 1st value from the 1st ddl, the 2nd ddl gets disabled. When i select 2nd value from 1st ddl, the 2nd ddl enables. This just what I needed. But there is a problem. When the 2nd ddl gets disabled, its size increases automatically & I don't want that. T have used table, update panel, trigger, content panel, still its not working. 
    I am attaching the portion of the code. Kindly help.

    <td>
    <label>Activity&nbsp;</label>
    </td>
    <td>
    <asp:UpdatePanel ID="Update_Panel1" runat="server">
    <ContentTemplate>
    <asp:DropDownList ID="ddl_Activity1" runat="server" AutoPostBack="True" 
    class="w100" onselectedindexchanged="ddl_Activity1_SelectedIndexChanged">     
    <asp:ListItem Text="Create Permanent Water Holes" Value="1"></asp:ListItem>
    <asp:ListItem Text="Improve Water Storage" Value="2"></asp:ListItem>
    </asp:DropDownList>
    </ContentTemplate>
    <Triggers>
    <asp:AsyncPostBackTrigger ControlID="ddl_SubActivity1" EventName="SelectedIndexChanged"/>
    </Triggers>
    </asp:UpdatePanel>
    </td>
    <td>
    <asp:label ID="lbl_SubActivity1" runat="server">Sub&nbsp;Activity</asp:label>
    </td>
    <td>
    <asp:UpdatePanel ID="Update_Panel2" runat="server">
    <ContentTemplate>
    <asp:DropDownList ID="ddl_SubActivity1" runat="server" 
    class="w100" AutoPostBack="True">
    <asp:ListItem Text="Desilting" Value="1"></asp:ListItem>
    <asp:ListItem Text="Deepening" Value="2"></asp:ListItem>
    <asp:ListItem Text="Repairing" Value="3"></asp:ListItem>
    </asp:DropDownList>
    </ContentTemplate>
    <Triggers>
    <asp:AsyncPostBackTrigger ControlID="ddl_SubActivity1" EventName="SelectedIndexChanged"/>
    </Triggers>
    </asp:UpdatePanel>    
    </td>
    Friday, January 24, 2014 1:07 PM