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

radgrid row height?

2 Answers 1224 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jayd
Top achievements
Rank 1
Jayd asked on 14 May 2012, 04:01 PM
I have a radgrid, and want to make the row height as small as possible so that I can fit many rows in a small space.  My RadGrid is inside of a user control, and in the user control's page load event, I have the following code:

rgMain.HeaderStyle.Height = Unit.Pixel(10);
rgMain.ItemStyle.Height = Unit.Pixel(10);
rgMain.AlternatingItemStyle.Height = Unit.Pixel(10);
rgMain.CellPadding = 0;
rgMain.CellSpacing = 0;

However, the grid rows are always 27 pixels tall, no matter what values I specify for the Height properties or CellPadding and CellSpacing.

2 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 14 May 2012, 05:33 PM
Hi Jayd,

Please examine the forum thread below which elaborates on this matter and see if it works for you:
http://www.telerik.com/community/forums/aspnet-ajax/grid/setting-rad-grid-row-height.aspx

Greetings,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jayd
Top achievements
Rank 1
answered on 14 May 2012, 11:04 PM
Thank you, Pavlina.  I created a CSS class that specifies the height and padding, and used that for my itemStyle and AlternatingItemStyle, and that worked.
Tags
Grid
Asked by
Jayd
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Jayd
Top achievements
Rank 1
Share this question
or