0

我需要在我的gridview中显示更新和取消按钮,而不是彼此重叠

现在是这样的:

http://i.imgur.com/J53fCSi.png

我需要它是这样的:

绿色按钮 红色按钮

有什么想法吗?

这是 asp.net 代码:

<asp:GridView runat="server" ID="CriteriosGridView" DataSourceID="dsCriterios" DataKeyNames="codigo"
        AutoGenerateColumns="False" CssClass="tabConfigGeral" HorizontalAlign="Center"
        BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
        CellPadding="3" OnDataBound="CriteriosGridView_DataBound">
        <Columns>
            <asp:BoundField DataField="codigo" HeaderText="Ordem" ItemStyle-HorizontalAlign="Center"
                InsertVisible="False" ReadOnly="True" SortExpression="codigo">
                <ItemStyle HorizontalAlign="Center"></ItemStyle>
            </asp:BoundField>
            <asp:BoundField DataField="filtro" HeaderText="Critério" SortExpression="filtro"
                ItemStyle-Width="200px">
                <ItemStyle Width="200px"></ItemStyle>
            </asp:BoundField>
            <asp:CommandField ShowEditButton="True" HeaderText="Ação" CancelText="" EditText=""
                UpdateText="" Visible="False" ButtonType="Image" CancelImageUrl="~/Images/Cancel.png"
                EditImageUrl="~/Images/action.Edit.gif" UpdateImageUrl="~/Images/Logado.png">
                <ControlStyle Height="14px" Width="14px" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Height="22px" Width="22px"
                    CssClass="BotaoGrid"></ItemStyle>
            </asp:CommandField>
        </Columns>
        <FooterStyle BackColor="White" ForeColor="#000066" />
        <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
        <SelectedRowStyle BackColor="#669999" HorizontalAlign="Center" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#318ADE" Font-Bold="True" ForeColor="White" />
        <RowStyle ForeColor="#000066" BackColor="White" HorizontalAlign="Center" />
        <AlternatingRowStyle BackColor="#E7F7FF" />
    </asp:GridView>
4

1 回答 1

0

Remove width attributes in

<ControlStyle Height="14px" Width="14px" />

And

<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Height="22px" Width="22px"
                CssClass="BotaoGrid"></ItemStyle>

To see if the layout is the problem. Or if you want to specify widths, make sure that the buttons have enough space.

于 2013-03-06T14:55:13.657 回答