Can I use export mode = InBrowser and get it to open up in a new browser? It keeps opening up in the same browser in EI.
Does anyone have any suggestions? Sorry, I ment to say open up in a new tab. The only browser I support is IE.
Hello Abby,
Thank you for posting in our community.
Currently, there is no property that could be set and export the document to a different browser tab.
However, what I can suggest is to create an additional aspx page. On this new page there are going to be an additional copy of the WebDataGrid as well as WebDocumentExporter with ExportMode set to "InBrowser" . On your primary page when the export button is clicked the page could be redirected to the second aspx page where the grid is going to be immediately exported(without the need of a button click). For example:
//primary aspx page with the export button - Default.aspx protected void btnExport_Click(object sender, EventArgs e) { Response.Write("<script>window.open('Default2.aspx','_blank');</script>"); } //second aspx page - Default2.aspx protected void Page_Load(object sender, EventArgs e) { this.WebDataGrid1.DataSource = populateGrid(); Report report = new Report(); this.WebDocumentExporter.Export(WebDataGrid1, report); }
//primary aspx page with the export button - Default.aspx
protected void btnExport_Click(object sender, EventArgs e)
{
Response.Write("<script>window.open('Default2.aspx','_blank');</script>");
}
//second aspx page - Default2.aspx
protected void Page_Load(object sender, EventArgs e)
this.WebDataGrid1.DataSource = populateGrid();
Report report = new Report();
this.WebDocumentExporter.Export(WebDataGrid1, report);
I also made a small sampel project illustrating my suggestion and I am attaching it for your reference. For my test I am using version 13.1.20131.2069 of NetAdvantage.
Additionally, this has been determined to be a new product idea. You can suggest new product ideas for furture versions(or vote for existing ones) at http://ideas.infragistics.com/.
There are many benefits to submitting a product idea:
- Direct communication with our product management team regarding your product idea.
- Notifications whenever new information regarding your idea becomes available.
- Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.
- Allow you to shape the future of our products by requesting new controls and products altogether.
- You and other developers can discuss existing product ideas with members of our Product Management team.
Steps to create your idea:
The Product Idea site puts you in the driver’s seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Thank you for contacting Infragistics