Data Grid Spacing

Mick Dugan

Well-known member
Joined
Jun 15, 2003
Messages
45
Is there a way to "pad" the text in a datagrid so the text isnt completely jambed against the vertical border? I dont want to center the text, just move it over a bit.
 
If you mean the column caption text, when right aligned, I generally append a space, followed by the pipe character:

eg:

myDataColumn.HeaderText = "Price |"
 
Actually, Im entering the header columns at design time, so adding a space wouldlnt be a problem. The column is for price as you alluded to and it dosent look good having the right aligned column jambed up against the adjacent left aligned column.
 
Back
Top