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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top