Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

avoid page flicker and move to JQuery

$
0
0
Hi,

I want to move to JQuery to the same functionality and avoid page flicker everytime I click on the button.
appreciate your input.

thanks
Bob

        <asp:CheckBox ID="chkSelectAll" runat="server"  Enabled="true"
                            AutoPostBack="true" Checked="false"
                            OnCheckedChanged="chkSelectAll_CheckedChanged" Text="Select All"/>


    protected void chkSelectAll_CheckedChanged(object sender, EventArgs e)
    {
        CheckBox chk;
        if (chkSelectAll.Checked)
        {
            foreach (GridViewRow gvr in GridView1.Rows)
            {
                chk = (CheckBox)gvr.FindControl("cbDelete");
                chk.Checked = true;
            }
        }

        if (!chkSelectAll.Checked)
        {
            foreach (GridViewRow gvr in GridView1.Rows)
            {
                chk = (CheckBox)gvr.FindControl("cbDelete");
                chk.Checked = false;
            }
        }
    }


Viewing all articles
Browse latest Browse all 23244

Trending Articles