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

CellPadding

7 Answers 317 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Daron
Top achievements
Rank 1
Daron asked on 31 Jan 2008, 10:55 AM
Hi all,

Not sure if I'm doing something wrong here, but the cellpadding property doesn't seem to work? (ie, doesn't do anything).

I'm constructing columns dynamically and not overriding the style, but no matter if I set cellpadding in mastertableview or the grid itself (or both!), the padding doesn't alter.

Any feedback appreciated.

Cheers
DT

7 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 01 Feb 2008, 08:09 AM
Hello Daron,

Can you temporarily remove the skin declaration for the control, to verify that the styles that you are setting locally, are not overridden by the skin. Also, you can assign css classes to the relevant items, with !important clauses, to ensure that they are not overridden by the skin.
I hope these suggestions help.

Greetings,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Matthew
Top achievements
Rank 1
answered on 29 Oct 2008, 08:53 PM
I am having the exact same problem with the Q2 2008 release. My Skin property is set to an empty string (""). Neither CellPadding or CellSpacing has any effect on the grid.
0
Yavor
Telerik team
answered on 30 Oct 2008, 07:50 AM
Hello Matthew,

I tested the setup locally, and the control behaved as expected. I suspect there is a difference in the way the settings are added. If the issue persists at your end, you can open a formal support ticket, and send us the problematic code, for further review.

Kind regards,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Matthew
Top achievements
Rank 1
answered on 30 Oct 2008, 04:33 PM
Here's the code:

<telerik:RadGrid runat="server" ID="grid" Width="690px" BackColor="White" Height="400px" GridLines="Both" Skin="" CellSpacing="10" CellPadding="10">
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
    </ClientSettings>
    <HeaderStyle />
</telerik:RadGrid>

I'm binding the grid to a DataTable using auto-generated columns.

Is there anything in this code that would cause CellSpacing and CellPadding to be ignored?

And if so, is that documented anywhere?



0
Yavor
Telerik team
answered on 03 Nov 2008, 10:53 AM
Hi Matthew,

You can review the following code sample for more information on an existing approach to handle this setup.
I hope this gets you started properly.

Regards,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Matthew
Top achievements
Rank 1
answered on 03 Nov 2008, 04:25 PM
Yavor, the code sample you posted has to do with rowspan and colspan. How is that relevant to the issues with CellPadding and CellSpacing that I've mentioned in this thread?
0
Yavor
Telerik team
answered on 04 Nov 2008, 07:47 AM
Hi Matthew,

I am sorry for an omission on my part.
Attached to this message, you will find a small application, which handles a similar setup. I hope it gets you started properly.

All the best,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Daron
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Matthew
Top achievements
Rank 1
Share this question
or