GridView : Aligner le contenu d'une colonne à gauche
Bonjour.
Je travaille en ASP VB .Net, sous Visual Studio 2010 et je souhaite tout simplement, dans un GridView, aligner à gauche le contenu d'une colonne.
Voici le code de ma GridView :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| <asp:GridView ID="GridViewOccurrences" runat="server" AllowPaging="True"
AutoGenerateColumns="False" DataKeyNames="CODECATEGORIEARTICLE"
EmptyDataText="Aucune occurrence" GridLines="None" HorizontalAlign="Center"
Width="754px" OnPageIndexChanging="GridViewOccurrences_PageIndexChanging"
OnSelectedIndexChanged="GridViewOccurrences_SelectedIndexChanged"
PageSize="1000">
<EmptyDataRowStyle CssClass="gridemptyrowstyle" />
<HeaderStyle CssClass="gridheader" />
<RowStyle CssClass="gridrow" HorizontalAlign="Left"/>
<AlternatingRowStyle CssClass="gridalternatingrowstyle" />
<SelectedRowStyle CssClass="gridselectedrowstyle" />
<PagerStyle CssClass="gridpager" HorizontalAlign="Center" />
<FooterStyle CssClass = "gridfooter"/>
<Columns>
<asp:BoundField DataField="CODECATEGORIEARTICLE" HeaderText="ID" Visible="False" />
<asp:ButtonField CommandName="Select" DataTextField="CHAMPCALCULE_DESIGNATION_INDENTEE_FR" HeaderText="Désignation">
<ControlStyle Width="320px" />
<HeaderStyle Width="320px" HorizontalAlign="Left" />
<ItemStyle Width="320px" HorizontalAlign="Left" />
</asp:ButtonField>
<asp:ButtonField CommandName="Select" DataTextField="ORDREAFFICHAGE" HeaderText="Ordre affichage">
<ControlStyle Width="80px" />
<HeaderStyle Width="80px" />
<ItemStyle Width="80px" />
</asp:ButtonField>
<asp:ButtonField CommandName="Select" DataTextField="CODECATEGORIEARTICLE" HeaderText="Code Catégorie Article">
<ControlStyle Width="80px" />
<HeaderStyle Width="80px" />
<ItemStyle Width="80px" />
</asp:ButtonField>
</Columns>
</asp:GridView> |
Mon problème est donc que malgré le :
Code:
1 2
|
<ItemStyle Width="320px" HorizontalAlign="Left" /> |
cette colonne reste toujours alignée en center.
Est-ce un bug de .Net ?
Que faire ?