I have a gridview inside an update panel and a treeview on the left side. When i click on a node, data is populated in grid view.
The gridview disappears when page index change event is fired. Im binding the data on page index change. This does not happen when i remove the update panel :(
Please help me! Thanks
.aspx.cs
protected void grdTestScripts_PageIndexChanging(object sender, GridViewPageEventArgs e) { grdTestScripts.PageIndex = e.NewPageIndex; grdTestScripts.PageSize 开发者_Go百科= contextObj.Pages;
if (Session["RowFilter"].ToString() == "0")
{
DataSet dsTC = new DataSet();
UIClassObject obj = new UIClassObject();
StringBuilder strBuild = new StringBuilder();
TreeView tvTestCases = ((TreeView)this.Master.FindControl("pnlTreeView").FindControl("tvTestCases"));
strBuild.Append(tvTestCases.SelectedNode.Value + ",");
GetSuiteIDS(tvTestCases.SelectedNode.ChildNodes, strBuild);
obj.SuiteIDS = strBuild.ToString().TrimEnd(',').TrimStart(',');
dsTC = BALSuite.GetSuiteSpecificTestScripts(obj);
grdTestScripts.DataSource = dsTC.Tables[0].DefaultView;
grdTestScripts.DataBind();
DisplayTestSummary(dsTC);
}
}
I found out the error. Inside the update panel, it was throwing an exception due to invalid HTML being generated. Since i had disabled the javascript debugging, the records were not bound to the gridview.
精彩评论