Hi,

How do I change the Row height of the GridView?

Can anyone help me out in this.

Thanks.

GridView1.Rows[0].Height = Unit.Pixel(40);

or

foreach(GridViewRow r in GridView1.Rows)
{
r.Height=Unit.Pixel(...);
}

or you can do that in markup...
check in GV Properties Window for RowStyle-> Set the Height

your GV markup will look something like below:

<asp:GridView ID="GridView2" runat="server" ..>
 [B]<RowStyle Height="30px" />[/B]
        <Columns>
        ...your columns
</Columns>
        </asp:GridView>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.