Setting unit size of border width property does not work

Hi again,

Setting the unit size of teh border property like so does not seem to work;

Aspose.Grid.Web.TableItemStyle t2r2b2l2 = new Aspose.Grid.Web.TableItemStyle();

t2r2b2l2.TopBorderStyle.BorderColor = System.Drawing.Color.Black;

t2r2b2l2.TopBorderStyle.BorderStyle = BorderStyle.Solid;

t2r2b2l2.TopBorderStyle.BorderWidth = new Unit(5, UnitType.Pixel);

Whereby this does set the border for the cell, changing the unit value does not seem to make any difference to the output cell border.

Is this a bug or am i doing something incorrectly or possibly omitting a line of code to apply the border properties?

Thanks for any help you can offer (and I appologise for my influx of forum posts by myself).

The details of my system are as follows;

Windows XP (sp2) - IIS5.1

VS.NET 2005 IDE

.NET 2.0

Aspose.Grid 2.0.57

IE7

Hi,

Well, I don't find the problem you are talking about. Following is my testing code and attached is the output screenshot result.

//Create a style.
TableItemStyle itemStyle = new TableItemStyle();
itemStyle.BorderStyle = BorderStyle.Solid;
itemStyle.BorderWidth = new Unit(5, UnitType.Pixel);
itemStyle.BorderColor = Color.Black;
itemStyle.BackColor = Color.Yellow;
itemStyle.ForeColor = Color.Red;

//Apply to second row.
for (int i = 0;i<10;i++)
{
GridWeb1.WebWorksheets[0].Cells[1,i].Style.CopyFrom(itemStyle);
}

Could you create a sample test project and post it here to show the issue, we will check it soon.

Thank you.

Hi,

Due to some tech limit, the grid doesn't support setting border width in XHTML mode.

If you just want this, you may use none XHTML mode. Please:

remove the "<!DOCTYPE ... XHTML 1.0 ..." tag line from the aspx file;

set the XhtmlMode to false for the GridWeb control.

Thanks for that, this did fix the border width problem, however, now the grid loads with the right click menu showing in the top left corner of the screen. Also, the width of the grid is not as expected, when XHTML mode is on, the grid is 100% of my container, whereas with XHTML mode off, it is only spannig half the containers area.

Is this a hangup with using non-XHTML mode, or is there something I can do to rectify the output.

Thanks again,

Danny

Hi,

I want to see the container you have mentioned. Please post the source code(aspx, cs) here. We will check them soon.