Beispiel #1
0
        protected void mypager_PageChanged(object src, PageChangedEventArgs e)
        {
            mypager.CurrentPageIndex = e.NewPageIndex;
            this.objList.CurrentPageIndex = e.NewPageIndex - 1;

            BindGrid();
            System.Text.StringBuilder sb = new System.Text.StringBuilder("<script Language=\"Javascript\"><!--\n");
            sb.Append("var el=document.all;");
            sb.Append(this.objList.ClientID);
            sb.Append(".scrollIntoView(true);");
            sb.Append("<");
            sb.Append("/");
            sb.Append("script>");
            if (!Page.IsStartupScriptRegistered("scrollScript"))
                Page.RegisterStartupScript("scrollScript", sb.ToString());
        }
Beispiel #2
0
 /// <summary>
 /// ���� <see cref="PageChanged"/> �¼�����ʹ������Ϊ�¼��ṩ�Զ��崦�����
 /// </summary>
 /// <param name="e">һ�� <see cref="PageChangedEventArgs"/>���������¼����ݡ�</param>
 protected virtual void OnPageChanged(PageChangedEventArgs e)
 {
     if(this.PageChanged!=null)
     PageChanged(this,e);
 }