ReoGrid Forum

Fast and powerful .NET Spreadsheet Component

You are not logged in.

Announcement

This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.

https://github.com/unvell/ReoGrid/issues

#1 2015-03-24 15:53:30

AB Zaman
Member
Registered: 2015-02-23
Posts: 14

Cell Padding

Hi,
Im trying to set cell padding, where cell padding value is entered by user in a textbox, named textBox1:

                sheet.SetRangeStyle(ReoGridRange.EntireRange, new ReoGridStyleObject()
                {
                    Flag = PlainStyleFlag.Padding,
                    Padding = new Padding(int.Parse(textBox1.Text)),
                 });

textbox has text and its not empty, but its not setting cell padding of my reogrid,

Can anyone help?

Offline

#2 2015-03-25 07:49:55

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Cell Padding

Padding now only work for cell body. In most cases the cell text will overflow the cell boundary, for example:

226.png

The Padding.Right does not work. If only set the Padding.Left, it is same as Cell.Style.Indent. Did you tried the preview download? it contains the indent feature.

http://reogrid.net/preview-download/

Offline

#3 2015-03-27 11:09:49

AB Zaman
Member
Registered: 2015-02-23
Posts: 14

Re: Cell Padding

Hi Jing,

Yes I have used the preview. It is working for indent and the outline exception is gone too, thank you. When it will be available for stable use?
Also I cant set the following style for column 0, im not sure if it happened after this preview download?

var Range = new ReoGridRange(0 , 1 , 1 , 1);
                   
sheet.SetRangeStyle(Range , new ReoGridRangeStyle()
{
    Flag = PlainStyleFlag.FontStyleUnderline | PlainStyleFlag.TextColor, 
    Underline = true,
    TextColor = System.Drawing.Color.Blue,
});

The above code, sets the style for 2nd column (index =1), but not for the first one (index = 0)

any help, please?

Offline

#4 2015-03-27 12:38:14

AB Zaman
Member
Registered: 2015-02-23
Posts: 14

Re: Cell Padding

Also there is no way to set padding for cells of grid now? Actually with spacing/presentation/underlines/colors, my data gets its meaning and hierarchy smile

Regards

Last edited by AB Zaman (2015-03-27 12:46:25)

Offline

#5 2015-03-27 16:15:07

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Cell Padding

Your code works for me. Did you set any styles on column 0 before this code?

Yes, padding not work for cell text, it works for cell body (Another feature: http://reogrid.net/document/custom-cell).

Offline

#6 2015-03-27 18:27:58

AB Zaman
Member
Registered: 2015-02-23
Posts: 14

Re: Cell Padding

Yes my bad, underline and color is working.

Please help me with another matter here, consider following image:
outlineCase.png
Here I have an outline on last three rows, now in  my code I'm adding a row under 6th row, and then adding outline on that added row, (basically another outline with in the same outline).

outlineCase1.png
The above is my code with InsertRow, but AddOutline part commented. Is it the same exception?

Thank you so much, for quick and useful replies.

Offline

#7 2015-03-28 17:35:44

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Cell Padding

Sorry, could you provide some code to describe this problem? 3-5 lines would be fine, I want to confirm the order of method call.

Offline

#8 2015-03-30 02:31:21

unvell
Administrator
Registered: 2014-06-03
Posts: 20
Website

Re: Cell Padding

Please continue reply on this topic: http://forum.reogrid.net/viewtopic.php?id=109

Offline

Board footer

Powered by FluxBB