Sign UpSign Up   Sign InSign In Welcome Guest,
Live Chat Live Chat

Grid style persistence error

Last post 06-29-2009, 8:56 AM by LeHobbit. 7 replies.
Sort Posts: Previous Next
  •  06-26-2009, 10:24 AM 185646

    Grid style persistence error

    I have an error persisting the style of the grid between postbacks. I have a simple grid and I set the background of a cell using the Aspose UI. When I click one time on the submit button, everything is OK. When I click a second time on the submit button, the style is disappearing.

    What's the problem ?

    Thanks.

     
  •  06-26-2009, 12:49 PM 185668 in reply to 185646

    Re: Grid style persistence error

    Hi,

    Well, I simply tested you scenario a bit and I don't find any problem. Which version of Aspoe.Grid.Web? Could you create a simple project and post it here to show the issue with all the details.

    Thank you.


    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  06-29-2009, 3:06 AM 185807 in reply to 185668

    Re: Grid style persistence error

    It's working fine with data and merged cells, but when I put style like background color or font style, it's not keeped between postbacks. I used a simple Grid in a SharePoint Web Part. I tried to set the SessionMode to ViewState and Session, and the result is always the same.
     
  •  06-29-2009, 4:00 AM 185819 in reply to 185807

    Re: Grid style persistence error

    After testing a bit more, the borders are keeped but not the other style attributes. My version of Aspose Grid is 2.0.0.2001.
     
  •  06-29-2009, 5:09 AM 185828 in reply to 185819

    Re: Grid style persistence error

    Attachment: Present (inaccessible)

    Hi,

    We have tested the following code with v2.0.1.2009 (attached). It works fine. Which version you are using? Please try the latest fix Aspose.Grid.Web v2.0.1.2009 (attached).

     

    if (!IsPostBack)

            {

                GridWeb1.WebWorksheets[0].Cells["a2"].Style.BackColor = Color.Red;

            }

     

    Thank you.


    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  06-29-2009, 6:13 AM 185844 in reply to 185828

    Re: Grid style persistence error

    Thanks. It is working a little bit better but with the exact same code, I have strange behaviours with styles. Using the 2.0.0.2001 version, I assign a CSS Class for multiple cells and the style is applied fine. Using the 2.0.1.2009, the style is applied very strangely : it applies the same style for each cells a CSS Class is applied.
     
  •  06-29-2009, 8:47 AM 185874 in reply to 185844

    Re: Grid style persistence error

    Hi,

    Could you create a simple project and post it here to show the issue using latest v2.0.1.2009, we will check it soon.

    Thank you.


    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  06-29-2009, 8:56 AM 185877 in reply to 185874

    Re: Grid style persistence error

    Thanks.

    Apparently, the problem is that when using the CssClass property for a cell, it's not keeped between post backs. Now I use the Style property, and it's all working fine.

     
View as RSS news feed in XML