Aug 16, 2011, 10:32 AM
GridPanel visibility
The page contains a Panel and a GridPanel inside it. I want to display or hide the GridPanel. It depends on some conditions.
Here is the hanlder (at the server side ) of the GridPanel's RefreshData event
Here is the hanlder (at the server side ) of the GridPanel's RefreshData event
protected void egrAttachments_RefreshData(object sender, StoreRefreshDataEventArgs e)
{
var dataSource = GetDataSource();
if (dataSource == null || !dataSource.Any())
{
gridPanel.Visible = false;
// gridPanel.Reconfigure(); gridPanel.Refresh();
}
else
{
MainStore.DataSource = dataSource;
MainStore.DataBind();
egrAttachments.Visible = true;
}
}
It doesn't work as I want. Can I refresh the gridPanel and how can I do it?
Last edited by AlexMaslakov; Aug 16, 2011 at 11:23 AM.