Esempio n. 1
0
 //fungsi: Refresh GridView
 protected void btnRefresh_Click(object sender, EventArgs e)
 {
     if (Page.IsValid)
     {
         GvLog.DataBind();
     }
 }
Esempio n. 2
0
 private void showLog()
 {
     GvLog.DataSource = LearnSite.Common.Log.FileList();
     GvLog.DataBind();
     if (GvLog.Rows.Count < 1)
     {
         Labelmsg.Text = "当前未发现异常情况记录!";
     }
 }
Esempio n. 3
0
        protected void txtHalaman_TextChanged(object sender, EventArgs e)
        {
            GridViewRow rowPager   = GvLog.BottomPagerRow;
            TextBox     txtHalaman = (TextBox)(rowPager.Cells[0].FindControl("txtHalaman"));

            try
            {
                if (int.Parse(txtHalaman.Text) <= GvLog.PageCount + 1 && int.Parse(txtHalaman.Text) > 0)
                {
                    GvLog.PageIndex = (int.Parse(txtHalaman.Text)) - 1;
                    GvLog.DataBind();
                }
            }
            catch (Exception)
            {
                txtHalaman.Text = (GvLog.PageIndex + 1).ToString();
            }
        }