I just upgraded Aspose.Cells.Gridweb dll and the grid no longer displays horizontal and vertical scrollbars. It worked fine in the previous version.
I am using Aspose.Cells.GridWeb version 2.7.7.2000
Previously I was using Aspose.Cells.GridWeb version 2.5.2.2000.
I'll try to attach zips of the projects but am having trouble doing so, the upload is timing out.
Here is the asp:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="dynamicAsposeGridWeb.WebForm1" %>
<%@ Register Assembly="Aspose.Cells.GridWeb" Namespace="Aspose.Cells.GridWeb" TagPrefix="acw" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<acw:gridweb ID="gridWeb1" runat="server"></acw:gridweb>
</div>
</form>
</body>
</html>
And the code-behind:
using System;
using System.Data;
using System.Data.OleDb;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Aspose.Cells.GridWeb;
using Aspose.Cells.GridWeb.Data;
namespace dynamicAsposeGridWeb
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack == true)
{
License license = new License();
license.SetLicense("Aspose.Cells.lic");
String connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Program Files\\Aspose\\Aspose.Cells for .NET\\Demos\\Common\\Database\\demos.mdb";
OleDbConnection conn = new OleDbConnection(connString);
OleDbCommand cmd = new OleDbCommand("SELECT *, +1 FROM PRODUCTS", conn);
//OleDbCommand cmd = new OleDbCommand("SELECT *, -1 FROM PRODUCTS", conn); //<-- this was crashing with previous dll
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
DataSet ds = new DataSet();
conn.Open();
da.Fill(ds, "PRODUCTS");
conn.Close();
WebWorksheet ws = gridWeb1.WebWorksheets[0];
ws.Cells.Clear();
ws.EnableCreateBindColumnHeader = true;
ws.DataSource = ds.Tables[0];
ws.CreateAutoGenratedColumns();
ws.DataBind();
}
}
}
}