Can I set a left margin for the Column Header Text?

Answered (Not Verified) This post has 0 verified answers | 5 Replies | 4 Followers Thread's RSS feed.

lievencardoen
Points 2,100
Replied On: Thu, Oct 12 2017 5:18 AM Reply

Can I set a left margin for the Column Header Text? A bit like the CellPadding?

Roles sticks to the Line ;-)

Thx, Lieven

  • Post Points: 20

All Replies

Sahaja Kokkalagadda
Points 5,810
Infragistics Employee
Replied On: Fri, Oct 13 2017 1:14 PM Reply

Hello Lieven,

Thank you for posting on our forums.

Adding left margin for column header text is previously answered here:

https://www.infragistics.com/community/forums/t/86719.aspx

As an alternative to CreationFilter you can also add empty spaces in front of the Column.Header.Caption to achieve this.

Please let me know if you have any questions.

Sincerely,
Sahaja Kokkalagadda
Associate Software Developer

  • Post Points: 20
lievencardoen
Points 180
Replied On: Wed, Oct 18 2017 10:13 AM Reply

Hi Mike,

I really have little experience yet with these CreationFilters. Could you help me out?

I've found that CellPadding on the UltraGrid does work, so luckily no CreationFilter need for that.

Thx, L.

  • Post Points: 5
lievencardoen
Points 180
Replied On: Thu, Nov 2 2017 5:09 AM Reply

Hi Mike,

Maybe the same CreationFilter could be used as my question in thread https://www.infragistics.com/community/forums/p/111189/522289.aspx#522289 ?

Kind regards and thx for the help!

  • Post Points: 5
lievencardoen
Points 180
Replied On: Tue, Nov 7 2017 7:44 AM Reply

Hi Mike,

Could you have a look at this. I would like to avoid having to put a 'space' before the text.

Thx, Lieven Cardoen

  • Post Points: 20
Mike Saltzman
Points 466,635
Infragistics Employee
Answered (Not Verified) Replied On: Tue, Nov 7 2017 10:39 AM Reply
Suggested by lievencardoen

Hi Lieven, 

I'm a bit confused about what you are asking. You could, in theory, use a CreationFilter to create a little extra space between the left edge of the header and the text. But that's probably not ideal, because CreationFilters operate at the rendering layer - they affect the drawing and hit-testing, but not the control's metrics. This means that you could shift the text, but the AutoSize logic (when the user double-clicks on the right edge of the column) doesn't know you moved the text, so it would end up getting clipped. 

Mike Saltzman

Manager - Windows Forms Development

Infragistics, Inc.

  • Post Points: 5
Page 1 of 1 (6 items) | RSS