Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
70
Margin at headertext does not work
posted

Hi Guys!

Some of my column headers a right aligned. The problem is that the text stucks at the right seperate bar of the column. I want to get some room between the text and the bar.

Explanation:

It's now like this: columnheader|
and i want to have it like this: columnheader  |

 

I tried several versions, but nothing works:

grdCostsSummary.Columns[3].CellStyle.Margin.Right = Unit.Pixel(10);
grdCostsSummary.Bands[0].Columns.FromKey("Net").CellStyle.Margin.Right = Unit.Pixel(10);
grdCostsSummary.Bands[0].Columns.FromKey("Net").Header.Style.Margin.Right = Unit.Pixel(10);

 

Can anyone give me a tipp?

  • 12679
    Suggested Answer
    posted

    Hello,

     

    If I understand correctly the issue is related to the column headers based on this you may try this code :

    this.UltraWebGrid1.Columns[2].Header.Style.Padding.Left = Unit.Pixel(20);

     

    If you would like to affect the cells style rather than  your columns you can use  this :

    this.UltraWebGrid1.Columns[2].CellStyle.Padding.Left = Unit.Pixel(20);