100
$.ig.GridExcelExporter.exportGrid in Angular2 not working in WinForm WebBrowser controls VB .net
posted

We are trying to display a web page in a windows form using web browser control. The web page that we are trying to open contains Excel export button, which is working fine in IE Edge browser and in chrome. But when trying to open it in web browser control in windows forms C# .Net application we are not getting any error message or not getting excel exported into the local folders. (In the below code it not even reaching success or error functions but is entering into exportStarting function). Below is the C# .Net code used 

private void userSecurityToolStripMenuItem_Click(object sender, EventArgs e)

        {

            webBrowser1.Navigate("URLofTheWebPage");

        }

Below is the typescript code used

$(me.gridName).igGrid("option", "dataSource", me.data);

        $.ig.GridExcelExporter.exportGrid($(me.gridName),

                    {

                        fileName: me.fileName,

                        worksheetName: me.workSheetName,

                        gridStyling: "applied",

                        gridFeatureOptions: { sorting: "applied" }

                    },

                    {

                        exportStarting: function (args:any):any {

                            var temp: any = this;

                            alert("Export Started");

                            args._gridData = me.data;

                            //debugger;

                        },

                        success: function () {

                            //debugger;

                            alert("Entered in to success");

                        },

                        error: function (error) {

                            //returns reference to the error object

                            alert("error");

                        }

                    }

        );