Click here to Skip to main content
15,897,891 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hi guys,

i was using JQUERY DATATABLE with in repeater in asp.net.

<asp:Repeater ID="Repeater1" runat="server">
                                            <HeaderTemplate>
                                                <table id="datatable" class="table table-striped  table-bordered" style="width: 100%; border: 1px solid #E0ECFF;
                                                    text-align: center" id="DeviceTbl">
                                                    <thead>
                                                        <tr>
                                                            <th>
                                                                EMPLOYEE NAME
                                                            </th>
</th>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <tr>
 <td align="left">
                                                        <%# Eval("Name")%>
                                                    </td>
 </tr>
                                            </ItemTemplate>
                                            <FooterTemplate>
                                                </tbody> </table>
                                            </FooterTemplate>
                                        </asp:Repeater>
 <script src="media/js/jquery.js" type="text/javascript"></script>
    <script src="media/js/jquery.dataTables.min.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        $('#datatable').dataTable();
    </script>


onpage load its working good, but once i click to edit.. where its open a popup, then this jquery datatable is getting disappear..

plz help/suggest me.

Thanks,
Posted
Updated 23-Mar-14 6:04am
v3

1 solution

JavaScript
$(document).ready(function() {
       $('#datatable').dataTable();
       });


Put $('#datatable').dataTable() in $(document).ready(funaction) as shown above.
I hope it will works... :-)
 
Share this answer
 
Comments
abdul subhan mohammed 24-Mar-14 4:04am    
no its not working at all

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900