Is there a way to add padding to the right of the grid or a column? If I have columns sized to the width of the grid, but my right-hand column contains right-justified text, the text value appears too close to the edge of the grid for my liking. I would like to create a gap of a few pixels to make it more visually appealing.
The only way I have found to do this is to add a blank column to the right of my existing column and size it as small as I can. However, it seems the smallest I can make a column is 14 pixels - any width smaller than this is ignored.
Thanks.
Hello ,
Actually you are right, CellAppearance doesn't have a Padding property , earlier I did research and find that option and that’s why I suggested but looking into API again we don’t have any
Padding property to set, so actually there is nothing inbuilt to add extra padding to the cell.
I was thinking about some workaround than may be you can add extra extra characters or spaces to the cell's content, which would effectively create visual padding to the last cell.
We do have RowSpacingBefore/after , but this will adjust spacing between rows, which can give the appearance of space around cells, but not directly padding the cell content itself.
Then the last option I could think would be creating CreationFilter.
Hi Divya. Thanks for your reply.
This sounds like it is exactly what I'm looking for. Unfortunately the column CellAppearance doesn't have a Padding property in my version (24.2). Can you please confirm?
Hello campbell ,
Thank you for contacting. Adding padding to the right of an UltraGrid column can be achieved by using the CellAppearance property of the column.
ultraGrid1.DisplayLayout.Bands[0].Columns["MyColumn"].CellAppearance.Padding.Right = 10
Hope this will help, if not then may be explain the scenario and share your sample for me to try and test the options.