Free Support Forum - aspose.com

BackImageAttributes attribute?

Hi,

What is the purpose of a the BackImageAttributes property on the TableItemStyle class ? I have set a BackImageUrl and I want the image to not be repeated within the cell.

Thanks.

Hi,

We have tested the following code, it works. But when we input a value in the cell and move the focus from it, the background image will be lost. This is a bug and we will fix it soon.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

if (!IsPostBack)

{

grdWeb.WebWorksheets[0].Cells[0, 0].Style.BackImageUrl = "/agw_client/b2.gif";

grdWeb.WebWorksheets[0].Cells[0, 0].StringValue = "fff";

}

Thank you.

Thanks,

But what's the purpose of the BackImageAttributes property ?

Hi,

The BackImageAttributes property is used to specify some background image attributes, it supports “background-position” and “background-repeat” attributes. Please try the attached version, we have fixed the previous bug in it.

Please try the following code:

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

if (!IsPostBack)

{

grdWeb.WebWorksheets[0].Cells[0, 0].StringValue = "fff";

grdWeb.WebWorksheets[0].Cells[0, 0].Style.BackImageAttributes = "right|no-repeat";

grdWeb.WebWorksheets[0].Cells[0, 0].Style.BackImageUrl = "/agw_client/b2.gif";

}

Please search MSDN to find the possible values of the two properties.

Thank you.

Thanks. It all works great. The only remaining problem is that the background image is not displayed when the Grid is exported to an Excel file.

Hi,

Well, I am afraid, the feature of exporting cell background image to excel file is not supported at the moment.

Sorry for any inconvenience.

Thanks. No problem. Is that something you plan to integrate in the future ?

Hi,

Well, we don't have such plan for it and above all, MS Excel does not have the relative feature.

Thanks for your understanding!

The issues you have found earlier (filed as 9521) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.