Hello,
I am using nestred gridview. showing parent gridview records.. if any of row has records of child gridview. i am showing using expand and collopase button.
this works fine. But this works when you expand on (+ symbol image). it shows child gridview and when collopase(- symbol image), child gridview hides.
aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
using (SqlConnection con = new SqlConnection(sqlconn))
{
con.Open();
string sqlqry = "select figno,name,childflag from parentview";
SqlCommand cmd = new SqlCommand(sqlqry,con);
SqlDataAdapter adap = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
adap.Fill(dt);
C1GridView1.DataSource = dt;
C1GridView1.DataBind();
}
}
}
// onrowdatabound action
protected void childgrid_bound(object sender, GridViewRowEventArgs e)
{
if (e.R ...
Go to the complete details ...