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

Left Margin of the Grid

3 Answers 48 Views
GridView
This is a migrated thread and some comments may be shown as answers.
erwin
Top achievements
Rank 1
Veteran
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
0
erwin
Top achievements
Rank 1
Veteran
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
Answers by
Martin Vasilev
Telerik team
erwin
Top achievements
Rank 1
Veteran
Share this question
or