Click here to Skip to main content
15,906,558 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a gridview which shows how many issues are open,pending and completed and when i click open only the issues which are opened are displayed in second gridview similarly when i click pending only the issues which are pending are displayed in same second gridview and when i click completed only the issues which are completed are displayed in second gridview based on the selection of link button the issyes are binded to second gridview. my question is how can i call the link button in page index changing event of second gridview
<pre lang="c#">protected void lnkOpen_Click(object sender, EventArgs e)
   {
       DataTable dt = adm.GetBugsToView("Open", ddlProject0.SelectedValue);
       gvShowBugs.Visible = true;
       lnkDownload1.Visible = true;
       if (dt.Rows.Count > 0)
       {
           gvShowBugs.DataSource = dt;
           gvShowBugs.DataBind();

       }
       else
       {
           gvShowBugs.DataSource = null;
           gvShowBugs.DataBind();
       }
       ViewState["Clicked"] = "Open";
   }

   protected void lnkInpen_Click(object sender, EventArgs e)
   {
       DataTable dt = adm.GetBugsToView("In-Progress", ddlProject0.SelectedValue);
       gvShowBugs.Visible = true;
       lnkDownload1.Visible = true;
       if (dt.Rows.Count > 0)
       {
           gvShowBugs.DataSource = dt;
           gvShowBugs.DataBind();

       }
       else
       {
           gvShowBugs.DataSource = null;
           gvShowBugs.DataBind();
       }
       ViewState["Clicked"] = "InProgress";
   }

   protected void lnkComp_Click(object sender, EventArgs e)
   {
       DataTable dt = adm.GetBugsToView("ReTest", ddlProject0.SelectedValue);
       gvShowBugs.Visible = true;
       lnkDownload1.Visible = true;
       if (dt.Rows.Count > 0)
       {
           gvShowBugs.DataSource = dt;
           gvShowBugs.DataBind();

       }
       else
       {
           gvShowBugs.DataSource = null;
           gvShowBugs.DataBind();
       }
       ViewState["Clicked"] = "Comp";
   }


What I have tried:

I need to call the bind the three view states data based on the click of link button how can i do this
protected void gvShowBugs_PageIndexChanging(object sender, GridViewPageEventArgs e)
  {

  }
Posted
Updated 21-Dec-17 20:10pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900