troubleshooting Question

Gridview columns too wide

Avatar of Dovberman
DovbermanFlag for United States of America asked on
.NET ProgrammingASP.NETMicrosoft Development
13 Comments1 Solution1261 ViewsLast Modified:
I designed a gridview and set the column widths.  The column widths of bond columns are displayed as set.  The displayed widths of button columns are wider than expected.

======
<asp:BoundField DataField="PriceUpCount"  
                    HeaderText="Days Up">
                    <HeaderStyle HorizontalAlign="Left" Width="0.2in" Font-Size="10pt"
                        Font-Names="Arial" ForeColor="Blue" />
                    <ItemStyle BackColor="White" ForeColor="Black" Font-Size="10pt" Font-Names="Arial"  
                    HorizontalAlign="Right" Width="0.2in"></ItemStyle>
                </asp:BoundField>
               
                <asp:BoundField DataField="PctChange" DataFormatString="{0:F1}"
                    HeaderText="% Up">
                    <HeaderStyle HorizontalAlign="Left" Width="0.7in" Font-Size="10pt"
                        Font-Names="Arial" ForeColor="Blue" />
                    <ItemStyle BackColor="White" ForeColor="Black" Font-Size="10pt" Font-Names="Arial"  
                    HorizontalAlign="Right" Width="0.7in"></ItemStyle>
                </asp:BoundField>
         
                <asp:ButtonField HeaderText="Eval -uate" ButtonType="Link" CommandName="Evaluate"
                    Text="Eval">
                    <HeaderStyle HorizontalAlign="Left" Width="0.5in"
                    Font-Names="Arial" Font-Size="10pt" ForeColor="Blue" />
                    <ItemStyle Width="0.5in" />
                </asp:ButtonField>

What should I change?

Thanks,
WiderThanSet.jpg
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 13 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros