asp.net - EDIT-UPDATE BUTTONS IN Repeater control -


i have repeater control collapsible panel inside div.(class header , class detail).when click edit button inside detail division - cancel , update button showing when click edit button div collapsing , can see update , cancel button after clicking row 1 more time..

every thing working fine except below stated one. each time click edit button division collapsing how can make class detail stable until edit/cancel/update.

thanks

 <style> .header { font-size: larger; font-weight: bold; cursor: hand; cursor:pointer;        background-color:#cccccc; font-family: verdana; } .details { display:none; visibility:hidden;           font-family: verdana; } </style>  &nbsp;<div style="overflow: scroll; overflow-x: hidden; overflow-y: auto;background-  color:gray;     height: 500px; width: 895px">  <asp:repeater id="repeater1" runat="server" datasourceid="sqldatasource1">        <itemtemplate>    <div id='h<%# databinder.eval(container, "itemindex") %>' class="header"    onclick='toggledisplay(<%# databinder.eval(container, "itemindex") %>);' style="border-style: none;">  <asp:panel id="panel3" runat="server" height="30px" borderstyle="none" backcolor="#79ffff">  <%# databinder.eval(container.dataitem, "license")%>  <%# databinder.eval(container.dataitem, "name")%>  <%# databinder.eval(container.dataitem," date")%> 

 <div id='d<%# databinder.eval(container, "itemindex") %>' class="details">   <asp:panel id="panel2" runat="server" height="195px" backcolor="gray" font-bold="false"   forecolor="maroon">  <br />     <asp:label id="label1" runat="server" text="licenseid"></asp:label>&nbsp;&nbsp;&nbsp;&nbsp;               <asp:textbox id="textbox1" runat="server" text='<%# databinder.eval  (container.dataitem,"licenseid") %>' enabled="false" backcolor="gray"   borderstyle="none"></asp:textbox>     <asp:label id="label2" runat="server" text="license  name"></asp:label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;              <asp:textbox id="textbox2" runat="server" text='<%# databinder.eval(container.dataitem,"licensename")%>' enabled="false" backcolor="gray" borderstyle="none"></asp:textbox>           </asp:panel>   </div>        </itemtemplate>   

toggle display

        function toggledisplay(id) {        var elem = document.getelementbyid('d' + id);        if (elem) {             if (elem.style.display != 'block') {             elem.style.display = 'block';             elem.style.visibility = 'visible';         }         else {             elem.style.display = 'none';             elem.style.visibility = 'hidden';         }     }     } 


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -