Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1253
ItemCommand not firing after POSTBACK
posted

Hi,

I have read a lot of the suggested answers provided in this forum - including the one with sample zip file.  However, does anyone know how to solve this issue.  I have a button in the ItemTemplate which fires WebDataGrid1_ItemCommand event correctly.  It does not work when the webdatagrid is inside the if statement.  Is there a way around this issue without binding the grid each time the button is clicked.  Please help!!  Thanks!

//if (!IsPostBack)
{

WebDataGrid1.DataSource = populateGrid();

WebDataGrid1.DataBind();
}

protected void WebDataGrid1_ItemCommand(object sender, HandleCommandEventArgs e)
{

......

}

Parents
No Data
Reply Children
No Data