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

[Solved] Left Margin of the Grid

3 Answers 303 Views
GridView
This is a migrated thread and some comments may be shown as answers.
erwin
Top achievements
Rank 1
Veteran
Iron
erwin asked on 11 May 2008, 10:35 AM
I've set up a very simple read-only Grid, and set Docking to Fill and the Grid to Fill.
However, there is a small Margin on the left side of the Grid (about the size of the scroll bar). This margin is there regardless if scrollbars are shown on the grid or not. Maybe used for complex hierarchical grids, but how can I remove this margin, so that the grid fills the whole area in my very simple case.

3 Answers, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 12 May 2008, 11:26 AM
Hello Erwin,

Thank you for the question.

You could remove GridTableElement padding by using the code block below:

((GridTableElement)this.radGridView1.RootElement.Children[0]).Padding = new Padding(0); 

I hope this helps. If you have additional questions do not hesitate to contact me again.

Kind regards,
Martin Vasilev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
YF
Top achievements
Rank 1
Iron
commented on 11 Dec 2025, 08:28 PM | edited

EDIT: my question was in error

Nadya | Tech Support Engineer
Telerik team
commented on 12 Dec 2025, 07:49 AM

Hello, Yossi,

It is not clear what your question is. If you are having any further difficulties, please provide more information here in the forum thread or open a new support ticket from your Telerik account.

Regards,
Nadya

YF
Top achievements
Rank 1
Iron
commented on 12 Dec 2025, 02:04 PM

Hi Nadya,

Never mind. I posted a question and quickly realized I was wrong.
I wanted to remove it so as not to confuse future readers but since I can't delete my own comments I just edited it.

YF

0
erwin
Top achievements
Rank 1
Veteran
Iron
answered on 12 May 2008, 01:53 PM

Thanks, works perfectly, what's the reason for having such a large left Margin / Padding?

Erwin


0
Martin Vasilev
Telerik team
answered on 12 May 2008, 02:41 PM
Hello Erwin,

I am glad to hear my suggestion has helped you achieve the desired appearance.

Actually, there is no special reason for the default Padding values. We will consider removing them in our future releases.

If you have other questions, do not hesitate to contact me again.

All the best,
Martin Vasilev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
erwin
Top achievements
Rank 1
Veteran
Iron
Answers by
Martin Vasilev
Telerik team
erwin
Top achievements
Rank 1
Veteran
Iron
Share this question
or