Currently we are evaluating ASPOSE Grid to see if it meets our needs. We have a problem trying to apply some style feature to one WebCell. Here is our aspx code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" Title="Untitled Page" %>
<%@ Register TagPrefix="agw" Namespace="Aspose.Grid.Web" Assembly="Aspose.Grid.Web" %>
http://www.w3.org/1999/xhtml" >
|
and the codebehind
public partial class Test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
WebWorksheet sheet = GridWeb1.WebWorksheets[0];
WebCell cella = sheet.Cells["A1"];
cella.PutValue("Test");
cella.IsReadonly = true;
Aspose.Grid.Web.TableItemStyle style1 = new Aspose.Grid.Web.TableItemStyle();
style1.CopyFrom(cella.Style);
style1.HorizontalAlign = HorizontalAlign.Center;
style1.VerticalAlign = VerticalAlign.Middle;
style1.BackColor = Color.FromName("#CCFFCC");
style1.Font.Bold = true;
cella.Style = style1;
}
}
}
All is working perfectly, but after we click the submit button the value of cell "A1" is still "Test", but the style and the backcolor is completly disappear.
Is there any way to maintain the previously applied style and colors?
Thank you,
Pietro Degani