Need Help with TELERIK radgrid export to excel issue. Anyone who can help with the below mentioned issue please reply.
So In the application we are using Telerik radGrid to display data table in a dynamic grid view. We are trying to export radgrid item to the excel sheet.
the below mentioned code snippet is working fine when the function is getting call from a single web page.
protected void RadCxtMenu_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e)
{
if (e.Item.Text == "Export to Word")
{
radGridItem.ExportSettings.ExportOnlyData = true;
radGridItem.ExportSettings.IgnorePaging = true;
radGridItem.ExportSettings.OpenInNewWindow = true;
radGridItem.MasterTableView.ExportToWord();
}
else if (e.Item.Text == "Export to Excel")
{
ExportClick();
radGridItem.ExportSettings.ExportOnlyData = true;
radGridItem.ExportSettings.IgnorePaging = true;
radGridItem.ExportSettings.OpenInNewWindow = true;
radGridItem.MasterTableView.ExportToExcel();
}
but the above code is not working when it is reffered from a rad multi page and rad tab.
The issue that we are facing is, the parent page where the rad multi page redirection is used to redirect to a different page where the grid view is used to display the data .we could not download the data to a excel file with the export to excel rad manu item click. The popup which should be displayed in the browser for the user to select and save the excel file is not getting displayed and the excel can not be saved. We are not sure if this is a telerik related constrain can any one advise. the code snippet or the rad multi page is given below.
protected System.Web.UI.WebControls.Label lblPageHeader;
protected Telerik.Web.UI.RadTabStrip uwtConsolidation;
protected Telerik.Web.UI.RadMultiPage RadMultiPage1;
public const string SELECTED_CONSOLIDATION_TAB = "SelectedConsolidationTab";
public static readonly string QUERY_FLAG = "FLAG";
public static readonly string QUERY_SERVICE ="NodeType";
if (!Page.IsPostBack)
{
RadPageView ConsolidatedEquipmentItemTab = new RadPageView();
RadPageView PlantHistoryTab = new RadPageView();
RadPageView IssueRegisterTab = new RadPageView();
ConsolidatedEquipmentItemTab.ContentUrl = "ConsolidatedEquipmentItem.aspx";
PlantHistoryTab.ContentUrl = "PlantHistory.aspx";
IssueRegisterTab.ContentUrl = "IssueRegister.aspx"; // This is the page that contains the grid where export is not working
//ConsolidatedEquipmentItemTab.Selected = true;
RadMultiPage1.PageViews.Add(ConsolidatedEquipmentItemTab);
RadMultiPage1.PageViews.Add(PlantHistoryTab);
RadMultiPage1.PageViews.Add(IssueRegisterTab);
switch (selectedTab)
{
case 0: ConsolidatedEquipmentItemTab.Selected = true; break;
case 1: PlantHistoryTab.Selected = true; break;
case 2: IssueRegisterTab.Selected = true; break;
default: ConsolidatedEquipmentItemTab.Selected = true; break;
}
}
if (Session[SELECTED_CONSOLIDATION_TAB] != null)
uwtConsolidation.SelectedIndex = selectedTab;
}
Please advise. We appreciate your help.
So In the application we are using Telerik radGrid to display data table in a dynamic grid view. We are trying to export radgrid item to the excel sheet.
the below mentioned code snippet is working fine when the function is getting call from a single web page.
protected void RadCxtMenu_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e)
{
if (e.Item.Text == "Export to Word")
{
radGridItem.ExportSettings.ExportOnlyData = true;
radGridItem.ExportSettings.IgnorePaging = true;
radGridItem.ExportSettings.OpenInNewWindow = true;
radGridItem.MasterTableView.ExportToWord();
}
else if (e.Item.Text == "Export to Excel")
{
ExportClick();
radGridItem.ExportSettings.ExportOnlyData = true;
radGridItem.ExportSettings.IgnorePaging = true;
radGridItem.ExportSettings.OpenInNewWindow = true;
radGridItem.MasterTableView.ExportToExcel();
}
but the above code is not working when it is reffered from a rad multi page and rad tab.
The issue that we are facing is, the parent page where the rad multi page redirection is used to redirect to a different page where the grid view is used to display the data .we could not download the data to a excel file with the export to excel rad manu item click. The popup which should be displayed in the browser for the user to select and save the excel file is not getting displayed and the excel can not be saved. We are not sure if this is a telerik related constrain can any one advise. the code snippet or the rad multi page is given below.
protected System.Web.UI.WebControls.Label lblPageHeader;
protected Telerik.Web.UI.RadTabStrip uwtConsolidation;
protected Telerik.Web.UI.RadMultiPage RadMultiPage1;
public const string SELECTED_CONSOLIDATION_TAB = "SelectedConsolidationTab";
public static readonly string QUERY_FLAG = "FLAG";
public static readonly string QUERY_SERVICE ="NodeType";
if (!Page.IsPostBack)
{
RadPageView ConsolidatedEquipmentItemTab = new RadPageView();
RadPageView PlantHistoryTab = new RadPageView();
RadPageView IssueRegisterTab = new RadPageView();
ConsolidatedEquipmentItemTab.ContentUrl = "ConsolidatedEquipmentItem.aspx";
PlantHistoryTab.ContentUrl = "PlantHistory.aspx";
IssueRegisterTab.ContentUrl = "IssueRegister.aspx"; // This is the page that contains the grid where export is not working
//ConsolidatedEquipmentItemTab.Selected = true;
RadMultiPage1.PageViews.Add(ConsolidatedEquipmentItemTab);
RadMultiPage1.PageViews.Add(PlantHistoryTab);
RadMultiPage1.PageViews.Add(IssueRegisterTab);
switch (selectedTab)
{
case 0: ConsolidatedEquipmentItemTab.Selected = true; break;
case 1: PlantHistoryTab.Selected = true; break;
case 2: IssueRegisterTab.Selected = true; break;
default: ConsolidatedEquipmentItemTab.Selected = true; break;
}
}
if (Session[SELECTED_CONSOLIDATION_TAB] != null)
uwtConsolidation.SelectedIndex = selectedTab;
}
Please advise. We appreciate your help.