Hi,
How do I change the Row height of the GridView?
Can anyone help me out in this.
Thanks.
Jump to Postor you can do that in markup...
check in GV Properties Window for RowStyle-> Set the Heightyour GV markup will look something like below:
<asp:GridView ID="GridView2" runat="server" ..> [B]<RowStyle Height="30px" />[/B] <Columns> ...your columns </Columns> </asp:GridView>
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>
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.