Server Controls in Accordion Content Template not enabled

Last post 11-16-2007 5:50 AM by Petrander. 1 replies.

Sort Posts:

  • Server Controls in Accordion Content Template not enabled

    11-16-2007, 3:46 AM
    • Loading...
    • Petrander
    • Joined on 10-31-2005, 11:13 AM
    • Copenhagen
    • Posts 122

    Hello all,

     I have been trying an Accordion from the Ajax Toolkit, that I databind to a certain datasource. However, for some reason the server controls I am putting in the content templates are not enabled. I.e. I cannot write in the textboxes and cannot click the buttons. Is this possible at all? Do I need UpdatePanels?

     Here is my code:

     

    <ajaxToolkit:Accordion ID="Accordion1" runat="server" FadeTransitions="True" Enabled="False" Width="600" Height="100" 
    RequireOpenedPane="false" OnLoad="Accordion1_Load" SelectedIndex="-1">
    <Panes>
    </Panes>
    <HeaderTemplate>
    *snip*
    </HeaderTemplate>
    <ContentTemplate>
    <table style="width: 100%">
    <tr>
    <td style="width: 100px">
    </td>
    <td>
    <div>
    <table>
    <tr>
    <td>
    Titel
    </td>
    <td>
    <asp:TextBox ID="txtTitle" runat="server" Width="200px"
    Text='<%# DataBinder.Eval(Container.DataItem, "title") %>' />
    </td>
    <td>
    <asp:Button ID="btnDelete" runat="server" Text="Slet klip" />
    </td>
    </tr>
    <tr>
    <td>
    Tags
    </td>
    <td>
    <asp:TextBox ID="txtTags" runat="server" Width="200px" Enabled="true" Text='<%# DataBinder.Eval(Container.DataItem, "tag") %>' />
    </td>
    <td></td>
    </tr>
    <tr>
    <td>
    Description
    </td>
    <td>
    <asp:TextBox ID="txtDescription" runat="server" Width="200px" TextMode="MultiLine" Rows="8"
    Text='<%# DataBinder.Eval(Container.DataItem, "description") %>' />
    </td>
    <td></td>
    </tr>
    <tr>
    <td>
    Kategori
    </td>
    <td>
    <asp:DropDownList ID="ddlCategory" runat="server"/>
    </td>
    <td>
    <asp:Button ID="btnOK" runat="server" Text="Gem" />
    </td>
    </tr>
    </table>
    </div>
    </td>
    </tr>
    </table>
    </ContentTemplate>
    </ajaxToolkit:Accordion>
     
     
  • Re: Server Controls in Accordion Content Template not enabled

    11-16-2007, 5:50 AM
    Answer
    • Loading...
    • Petrander
    • Joined on 10-31-2005, 11:13 AM
    • Copenhagen
    • Posts 122

    Gosh! What an idiot am I! The accordion has its "enabled" attribute set to false!  

     Sorry for having wasted space and bandwidth...
     

Page 1 of 1 (2 items)
Microsoft Communities
Page view counter