Hello,
I had aspx code that is structure like below
ASPX:
<Form>
<RadAjaxPanel ClientEvents-OnRequestStart="PanelRequestStarted"...>
<asp:Table ...>
<asp:TableRow ...>
<asp:TableCell>
<asp:ImageButton ID="ImageButtonExport" OnClick="ImageButtonExport_Click" ... />
<asp:TableCell>
<asp:TableCell>
<asp:Button ID="ButtonCallDialog" ... />
<asp:TableCell>
</asp:TableRow>
</asp:Table>
<asp:Panel ...>
<RadGrid ID='RadGridExport' ... >
</RadGrid>
</asp:Panel>
</RadAjaxPanel>
<RadWindowManager...>
<windows>
<RadWindow ID="RadWindowDialog" ...>
</RadWindow>
</windows>
</RadWindowManager>
<AjaxLoadingPanel ...>
...
</AjaxLoadingPanel>
<Script>
function ShowDialog()
{
var radWindow = window.radopen(null, "RadWindowDialog");
radWindow.SetUrl(radWindow.GetUrl());
}
function PanelRequestStarted(ajaxPanel, eventArgs)
{
if (eventArgs.EventTarget = 'ImageButtonExport')
eventArgs.EnableAjax=false;
}
</Script>
</Form>
C#:
private void Page_Load(object sender, EventArgs e)
{
ButtonCallDialog.Attributes.Add("OnClick", "ShowDialog();return false;");
}
protected void ImageButtonExport_Click(object sender, ImageClickEventArgs e)
{
RadGridExport.ExportSettings.OpenInNewWindow = true;
RadGridExport.MasterTableView.ExportToExcel();
}
I click ImageButtonExport first and the it asked whether I want to open or save, I choose to open (it need to get open out side browser not in side browser).
The problem happen after it open up excel spreadsheet I went back to the page and click on ButtonCallDialog I had to click twice. The first click gave me an error "'null' is null or not an object" second click succefully display RadWindow.
What do I need to do to get ButtonCallDialog work on the first click?
Thanks.
I had aspx code that is structure like below
ASPX:
<Form>
<RadAjaxPanel ClientEvents-OnRequestStart="PanelRequestStarted"...>
<asp:Table ...>
<asp:TableRow ...>
<asp:TableCell>
<asp:ImageButton ID="ImageButtonExport" OnClick="ImageButtonExport_Click" ... />
<asp:TableCell>
<asp:TableCell>
<asp:Button ID="ButtonCallDialog" ... />
<asp:TableCell>
</asp:TableRow>
</asp:Table>
<asp:Panel ...>
<RadGrid ID='RadGridExport' ... >
</RadGrid>
</asp:Panel>
</RadAjaxPanel>
<RadWindowManager...>
<windows>
<RadWindow ID="RadWindowDialog" ...>
</RadWindow>
</windows>
</RadWindowManager>
<AjaxLoadingPanel ...>
...
</AjaxLoadingPanel>
<Script>
function ShowDialog()
{
var radWindow = window.radopen(null, "RadWindowDialog");
radWindow.SetUrl(radWindow.GetUrl());
}
function PanelRequestStarted(ajaxPanel, eventArgs)
{
if (eventArgs.EventTarget = 'ImageButtonExport')
eventArgs.EnableAjax=false;
}
</Script>
</Form>
C#:
private void Page_Load(object sender, EventArgs e)
{
ButtonCallDialog.Attributes.Add("OnClick", "ShowDialog();return false;");
}
protected void ImageButtonExport_Click(object sender, ImageClickEventArgs e)
{
RadGridExport.ExportSettings.OpenInNewWindow = true;
RadGridExport.MasterTableView.ExportToExcel();
}
I click ImageButtonExport first and the it asked whether I want to open or save, I choose to open (it need to get open out side browser not in side browser).
The problem happen after it open up excel spreadsheet I went back to the page and click on ButtonCallDialog I had to click twice. The first click gave me an error "'null' is null or not an object" second click succefully display RadWindow.
What do I need to do to get ButtonCallDialog work on the first click?
Thanks.