Free Support Forum - aspose.com

GridWeb cell style BorderWidth

Hi,


I'm using Aspose.Cells for .NET (framework 2.0) in a ASP.NET page.

The problem is when I try to set the BorderWith in a specific cell. I've tried to used different values, but it's always rendered as if it was only 1px width.

Please see the attached image.

I'm using the following code to change the style:

...

Dim st As New Aspose.Cells.GridWeb.TableItemStyle
st.CopyFrom(gdEscala.WebWorksheets(0).Cells(row, i).GetStyle())
st.BorderColor = Color.Olive
st.BorderStyle = BorderStyle.Solid
st.BorderWidth = New Unit("3px")
gdEscala.WebWorksheets(0).Cells(row, i).SetStyle(st)

...

Can you help me figure out what am I doing wrong?

Best regards,

António Carvalho

Hi,


After an initial test, I can find the issue as you have mentioned. Even I tried other values for different types including pixels, points and integers using Unit API but to no avail.
I have logged a ticket with an id: CELLSNET-41126 for your issue. We will soon look into it to figure it out.

Thank you.

Hi,

Thanks for using Aspose.Cells for GridWeb.

We have looked into your issue and it does not seem to be a bug,

If you set XhtmlMode=“True” for GridWeb, the border width will be converted to 1px always.

While if XhtmlMode=“False”, the cell border width will work.

Could you please try it again and let us know your findings?

Hello,


The xhtmlmode is needed so other features can work properly in modern browsers. You can check in the link So you solution is not usable.

Best regards,

António Carvalho

Hi,

Thanks for your feedback.

We will look into your issue and get back to you asap.

Hi,

Thanks for using Aspose.Cells for GridWeb.

In Ms-Excel we can not set border width by pix level, so currently we only
support diffrent border style and color.

Also, we have evaluated this feature, if we enable this feature, there are some side effects, the data row alignment will break. It can not keep consistent with left head row.

Hello,


That's ok to me only when I save to Excel or read from Excel.

But you should allow to have borders with different widths.

Plus: from your last post, I could almost believe that you do allow it...


Best regards,

António Carvalho

Hi,

Thanks for your posting and using Aspose.Cells for GridWeb

I am afraid, this feature is not available and also we do not support it.

It will break our existing functionality and will take us quite a lot and indefinite amount of time to implement it.

Hi,


I just find strange that you said:

"

If you set XhtmlMode="True" for GridWeb, the border width will be converted to 1px always.

While if XhtmlMode="False", the cell border width will work.

"

And now you say this feature is not available?

Why do you have so different modes for Xhtml?

To have compatibility with all new browsers (Chorme, Firefox, Safari, IE 9) which mode should I use? IE 6 is dead, don't you know?

Why this seams a kind of hidden feature with the need to change for some features and keep in another?


Regards,

António Carvalho

Hi,

Thanks for your posting and using Aspose.Cells for GridWeb.

We have investigated and found your issue. We will provide you a fix soon.

Once, the issue is resolved or we have some other update for you, we will let you know asap.

Hi,


Please try the attached latest fix v2.7.12.2003.

After further investigation we come to know that in MS-Excel one cannot
specify border width using specific number directly, so the user can only apply thin or thick border styles. So, now we only
support 1px and 2px border width which refer to thin and thick styles of border width same as with MS-Excel (which has only two styles regarding line width i.e. thin and thick – you may confirm it in MS Excel).


Thank you.

Hi,


Thanks for your update,
I think your solution is ok.

Best regards,
António Carvalho

Hi,

Thanks for your posting and using Aspose.Cells for GridWeb.

It’s good to know that solution will work for you.

Let us know if you face any other issue, we will be glad to assist you further.

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


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