Hi All,
I am using ASP GridView and was added to DevExpress ASPxPopupControl.
The PopupControl will be shown once a cell in DevExpress ASPxPivotGrid is clicked to show the transaction details.
My problem is, the previous value of the GridView is shown when the popup control is displayed while the new data is being loaded.
I have tried setting the datasource to null and rebinding at the start of Detail_PopupControl_WindowCallback() thinking that a blank grid view will be displayed.
But as observed, still the previous data is displayed while the new data is being loaded or Detail_PopupControl_WindowCallback() is being processed.
Please advise on how to clear the previous data of grid view or how to check if the grid view is done loading the data so that I will display the grid view only once data is fully loaded.
Below is the code snippet.
protected void Page_Load(object sender, EventArgs e)
{
...
Main_PivotGrid.ClientSideEvents.CellClick = GetJSCellClickHandler();
}
protected string GetJSCellClickHandler()
{
string sRtn = "";
sRtn = string.Format(@"function (s, e) {{
var columnIndex = document.getElementById('{0}'),
rowIndex = document.getElementById('{1}');
columnIndex.value = e.ColumnIndex;
rowIndex.value = e.RowIndex;
Detail_PopupControl.PerformCallback();
Detail_PopupControl.Show();
}}", ColumnIndex.ClientID, RowIndex.ClientID);
return sRtn;
}
//This function is invoked on DevExpress.Web.ASPxPopupControl Window Callback
protected void Detail_PopupControl_WindowCallback(object source, DevExpress.Web.ASPxPopupControl.PopupWindowCallbackArgs e)
{
//Performs cube query and passing the results to grid view
...
//Grid View is added on popupcontrol
Detail_PopupControl.Controls.Add(GridView);
...
}
Regards,
Charllemagne
↧
ASP Grid View: Clear Previous Data / Check if done loading / Show and Hide Grid View
↧