We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Wihout toolbox how to create WebGrid dynamically


can you provide me code that create webGrid control dynamically

which namespace i have to refer in web config files. etc.

I have not installed Aspose using MSI. our company does not allow so i just reference aspose.dll in my web project and creating excel files and pivot etc. but i need to use WebGrid to show pivot on Web page. otherwise ihave to use some crapy DevExpress third party Pivotgrid that i do not like.

I am very much comfortable with Aspose.

your help is appriciated as this is very urgent and i need to show them by wednesday.i have already code to create excel using aspose just need to show same excel in WebGrid.

i am getting following error while executing following code.I have attached Error File.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Aspose.Cells;
using Aspose.Cells.GridWeb;

public partial class AsposeWebGrid : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)

Aspose.Cells.GridWeb.GridWeb GridWeb1 = new Aspose.Cells.GridWeb.GridWeb();
GridWeb1.EditMode = false ;

//Enabling the Sessionless Mode of GridWeb
// GridWeb1.EnableSession = false;

//Setting the height of GridWeb control
GridWeb1.Height = new Unit(200, UnitType.Point);

//Setting the width of GridWeb control
GridWeb1.Width = new Unit(520, UnitType.Point);


Hi Piyush,

Thanks for your posting and using Aspose.Cells for GridWeb.

It seems, you are missing the following settings in the Web.config file. I have attached a sample web project that creates the GridWeb dynamically and it works fine. Please download and use it for a reference.

It uses the latest GridWeb i.e v7.0.0.2000, which you can download from this link: Aspose.Cells for .NET 8.0.0

The red highlighted part is a path to acw_client directory which contains necessary GridWeb file e.g acwmain.js. You can also find this directory from the same link: Aspose.Cells for .NET 8.0.0.

<add key=“aspose.cells.gridweb.acw_client_path” value=“grid/acw_client”/>