Gridview horizonal cell spacing/padding

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
 
G

Guest

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top