Gridview horizonal cell spacing/padding

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to set the horizontal cell spacing or padding of a gridview
without setting the vertical spacing/padding? I'd like to be able to put
some space between the columns without putting space between the rows.

Thanks,
Greg
 
Greg,
Try the CssClass attribute in ItemStyle for each column you want to format.

<asp:BoundField DataField="request_id" HeaderText="request_id">
<ItemStyle CssClass="col" />
</asp:BoundField>

cssclass:
..col
{
padding-right:10px;
padding-left:50px;
}

HTH,
Rakesh
 
Back
Top