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

setting rad grid row height

1 Answer 757 Views
Grid
This is a migrated thread and some comments may be shown as answers.
shiva
Top achievements
Rank 1
shiva asked on 08 Jul 2010, 07:43 AM
Hi,
i want to set the height if row.
i wrote like CS,
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridDataItem) 
        { 
            GridDataItem item = (GridDataItem)e.Item; 
            item.Height = Unit.Pixel(10); 
        } 
    } 
 
but it is not working.reply me

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 08 Jul 2010, 08:05 AM
Hi Shiva,

Table row height does not work if the row content is higher - this is expected. In order to achieve the desired layout, you either need to reduce the cell paddings and font size, or reduce the cell content. Please refer to the following two examples:

http://www.telerik.com/community/forums/aspnet-ajax/grid/row-height-revisited.aspx#702997

Note that you need to modify the CSS rules by adding "div" at the front like this:

div.RadGrid  .Row1  td
{
    padding-top:0;
    padding-bottom:0;
    height:1px;
    font:1px/1px sans-serif;
}


http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-max-height.aspx


Kind regards,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
shiva
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or