<asp:gridview id="grdJobHistory" bordercolor="AliceBlue" runat="server" cellpadding="4" ¬ font-names="verdana" font-size="Small" forecolor="#333333" gridlines="Vertical" ¬ xmlns:asp="#unknown"> Width="100%" AutoGenerateColumns="False" AllowPaging="True" ¬ OnPageIndexChanging="grdJobHistory_PageIndexChanging">
protected void grdJobHistory_PageIndexChanging(object sender, GridViewPageEventArgs e) { if (Convert.ToString(Request.QueryString["empcode"].ToString()) != "") { Library lib = new Library(); DataTable dtJobHistory = lib.ViewSubmit("aaa", "RNV", "empcode"); if (dtJobHistory.Rows.Count > 0) { grdJobHistory.PageIndex = e.NewPageIndex; grdJobHistory.DataSource = dtJobHistory; grdJobHistory.DataBind(); } else { lblNoRecordFound.CssClass = "Fail"; lblNoRecordFound.Text = "no data"; lnkPrint.Visible = false; } } }
if (dtJobHistory.Rows.Count > 0) { e.Cancel=true; grdJobHistory.DataSource = dtJobHistory; grdJobHistory.DataBind(); grdJobHistory.PageIndex = e.NewPageIndex; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)