Hi,
I am using Master/Content page in my system. The content page is aspx which calls user control.
The user control creates the dynamic template column and binds to the grid. There is a asp link button called "log" in one of the columns in the grid and when I click the button, it inserts record into the db and disables the link button, so that user can not click the button again. I got the log button disabled but the grid is not refreshing the updated data.
I have used AjaxManagerproxy in my ascx. I call the binding of the grid inside gridview_NeedDataSource.
The following code is in Page_PreRender.
if (IsPostBack)
{
if (Session["isLog"] != null && Session["isLog"].ToString() == "true")
{
//gridview.DataSource = new string[] { };
//gridview.DataSource = null;
this.BindGrid();
//gridview.Rebind();
Session["isLog"] = "";
}
The grid binds the data twice when I tried clearing the grid by using "gridview.DataSource = null;", just before binding the grid.
The grid does not display any data if I use "gridview.DataSource = new string[] { };" just before binding the grid.
Can you please help me in fixing the Refresh inside the grid?
Thanks!
I am using Master/Content page in my system. The content page is aspx which calls user control.
The user control creates the dynamic template column and binds to the grid. There is a asp link button called "log" in one of the columns in the grid and when I click the button, it inserts record into the db and disables the link button, so that user can not click the button again. I got the log button disabled but the grid is not refreshing the updated data.
I have used AjaxManagerproxy in my ascx. I call the binding of the grid inside gridview_NeedDataSource.
The following code is in Page_PreRender.
if (IsPostBack)
{
if (Session["isLog"] != null && Session["isLog"].ToString() == "true")
{
//gridview.DataSource = new string[] { };
//gridview.DataSource = null;
this.BindGrid();
//gridview.Rebind();
Session["isLog"] = "";
}
The grid binds the data twice when I tried clearing the grid by using "gridview.DataSource = null;", just before binding the grid.
The grid does not display any data if I use "gridview.DataSource = new string[] { };" just before binding the grid.
Can you please help me in fixing the Refresh inside the grid?
Thanks!