<div style="margin-left: 280px"> <asp:GridView ID="exportGrdVw" runat="server" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Vertical" AllowPaging="True" PageSize="3" OnPageIndexChanging="exportGrdVw_PageIndexChanging" onpageindexchanged="exportGrdVw_PageIndexChanged"> protected void Page_Load(object sender, EventArgs e)
<div style="margin-left: 280px"> <asp:GridView ID="exportGrdVw" runat="server" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Vertical" AllowPaging="True" PageSize="3" OnPageIndexChanging="exportGrdVw_PageIndexChanging" onpageindexchanged="exportGrdVw_PageIndexChanged">
{ if (!IsPostBack) { SqlDataAdapter da = new SqlDataAdapter("select customername,contactno,address from employee ", con); da.Fill(table); BindEmployee(); } } public void BindEmployee() { exportGrdVw.DataSource = table; exportGrdVw.DataBind(); } protected void exportGrdVw_PageIndexChanging(object sender, GridViewPageEventArgs e) { exportGrdVw.PageIndex = e.NewPageIndex; BindEmployee();
}
the problem is gridview is displaying but when i click page 2. 2nd page data is not showing (blank).