This is a migrated thread and some comments may be shown as answers.

Padding

3 Answers 418 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 2
Stephen asked on 12 Jun 2009, 06:05 PM
I'm trying to get a little space around the items in the grid, some right-justified numbers are running right up against the grid line. I tried setting the Padding attribute of the RadGridView but it does not seem to have any noticeable effect. Can you advise if this should do what I expect?

Stephen

3 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 15 Jun 2009, 12:54 PM
Hello Stephen,

You can handle CellFormatting event and set the Padding property of the cell. Here is sample code:

void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e) 
{             
    e.CellElement.Padding = new Padding(0, 0, 5, 0); 

If you need further assistance, I will be glad to help.

Kind regards,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jeremy Murtishaw
Top achievements
Rank 1
answered on 10 Jul 2009, 01:01 AM
Hello,

I am having this trouble as well, but using this workaround isn't compatible with BestFit, since it widens the contents of the column by the padding, causing some cells to be forced to contain elipses... because the content no longer fits. Is there a way to implement padding while still having a proper bestfit?

Thanks!
Jeremy
0
Jack
Telerik team
answered on 10 Jul 2009, 01:46 PM
Hi Jeremy Murtishaw,

We addressed this issue in our latest release - Q2 2009. I recommend that you try it. We will also appreciate any feedback from you. If you have further questions, please write us back.

Kind regards,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Stephen
Top achievements
Rank 2
Answers by
Jack
Telerik team
Jeremy Murtishaw
Top achievements
Rank 1
Share this question
or