jQuery DataTable plugin not working after ASP.Net UpdatePanel PostBack

on Dec 23, 2014 03:01 AM

i add timer in my repeater control it perfactly run .but when execute timer then output loast repeater control designing.

how to solve it?



<link rel="Stylesheet" type="text/css" href="css/demos.css" />
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/jquery.dataTables.js"></script>
    <script type="text/javascript">
        $(function () {


<div class="grid_10">
        <div class="box round">
            <div style="text-align:center">
                <asp:Label ID="lblMessage" runat="server" class="error"></asp:Label>
            <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <asp:Timer runat="server" ID="Timer1" Interval="60000" OnTick="Timer1_Tick" />
            <asp:Repeater ID="List" runat="server" OnItemCommand="List_ItemCommand">
                    <table class="data display dataTable" id="tab">
                                <th>Time At</th>
                                <td><%#Eval("Time")%> Minutes</td>
                       </tbody> </table><br /><br /><br />

            <div class="box round">  
                <table style="float: right;text-align: right;font-size:15px">
                        Record Size:
                            <asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="true" OnSelectedIndexChanged="PageSize_Changed">
                                <asp:ListItem Text="10" Value="10" />
                                <asp:ListItem Text="25" Value="25" />
                                <asp:ListItem Text="50" Value="50" />

                        <asp:Repeater ID="rptPager" runat="server">
                                <asp:LinkButton ID="lnkPage" runat="server" Text = '<%#Eval("Text") %>' CommandArgument = '<%# Eval("Value") %>' Enabled = '<%# Eval("Enabled") %>' OnClick = "Page_Changed"></asp:LinkButton>
        <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
    <div class="clear">


protected void Timer1_Tick(object sender, EventArgs e)
            objBussinessObj.PageIndex = 1;
            objBussinessObj.PageSize = 10;
            CurrentLocationList.DataSource = objBussinessLogic.GetAllDetails(objBussinessObj);

private void GetDetails(int pageIndex)
            objBussinessObj.PageIndex = pageIndex;
            objBussinessObj.PageSize = int.Parse(ddlPageSize.SelectedValue);
            CurrentLocationList.DataSource = objBussinessLogic.GetDetails(objBussinessObj);
            int recordCount = Convert.ToInt16(objBussinessObj.RecordCount.ToString());
            this.PopulatePager(recordCount, pageIndex);

        protected void Page_Changed(object sender, EventArgs e)
            int pageIndex = int.Parse((sender as LinkButton).CommandArgument);


Download FREE API for Word, Excel and PDF in ASP.Net: Download
on Dec 23, 2014 03:02 AM

That's because your plugin is not applied after Partial Postback and hence please refer

jQuery Plugins not working after ASP.Net AJAX UpdatePanel Partial PostBack or when Asynchronous request is over