Export to Excel for Dynamic Grid panel

  1. #1

    Export to Excel for Dynamic Grid panel

    Hi Guys,

    I am using Dynamic Gridpanel in Button click i added Export to Excel button in top bar of Grid Panel and showing data in Grid panel successfully but if i click on Export to excel button i am getting below exception like attached screen shot
    and Mycode is as follows
    Model readerGrid = new Model();
    //Store storeChart = new Store { ID = "storeChart", Model = { readerChart } };
    Store storeGrid = new Store();
    storeGrid.ID = "storeGrid";
    // Ext.Net.Store storeGrid = new Ext.Net.Store { ID = "storeGrid", Model = { readerGrid } };
    storeGrid.SubmitData += storeGrid_Submit;

    Ext.Net.GridPanel grid = new Ext.Net.GridPanel
    {
    ID = "GridPanel1",
    AutoDoLayout = true,
    ForceFit = false,
    Collapsible = true,
    Width = 950,
    Height = 450

    };
    grid.Store.Add(storeGrid);
    // storeGrid.RefreshData += new Store.AjaxRefreshDataEventHandler(store_RefreshDat a); return store; }
    Ext.Net.Button but=new Ext.Net.Button
    {
    ID="but",
    Text="To Excel",
    Icon=Icon.PageExcel
    };
    but.Listeners.Click.Handler = "submitValue(#{GridPanel1}, #{FormatType}, 'xls');";
    but.DirectEvents.Click.IsUpload = true;
    grid.BottomBar.Add(new PagingToolbar());
    Toolbar tbr = new Toolbar();
    tbr.Items.Add(but);
    grid.TopBar.Add(tbr);
    storeGrid.Model.Add(readerGrid);
    storeGrid.DataSource = Colms;
    storeGrid.DataBind();
    this.Form.Controls.Add(grid);
    this.Panel.Items.Add(grid);

    Please suggest to solve this

    Thanks In Advance
    Kavitha
    Attached Thumbnails Click image for larger version. 

Name:	error.PNG 
Views:	8 
Size:	34.2 KB 
ID:	7523  

Similar Threads

  1. Export grid panel data to excel
    By sumesh in forum 1.x Help
    Replies: 1
    Last Post: Sep 23, 2013, 9:07 AM
  2. [CLOSED] Import/ Export Excel from/to Grid Panel (Urgent Pls!!!)
    By canusr1 in forum 2.x Legacy Premium Help
    Replies: 12
    Last Post: Aug 16, 2013, 6:05 AM
  3. Export to excel: Grid Panel with multiple pages.
    By breakyoheart in forum 2.x Help
    Replies: 0
    Last Post: Aug 02, 2012, 8:09 PM
  4. Replies: 1
    Last Post: May 28, 2012, 5:17 AM
  5. Export grid panel data to excel
    By sumesh in forum 1.x Help
    Replies: 0
    Last Post: May 19, 2012, 6:01 AM

Tags for this Thread

Posting Permissions