Bonjour,
J'ai une listView dans un UserControl :
Dans le code behind, j'aimerais savoir comment faire pour accéder/modifier les valeurs des titres de mes colonnes :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 <div class="divListViewMapping"> <asp:ListView runat="server" id="ListViewMapping" EnableViewState="false" OnItemDataBound="ListViewMapping_ItemDataBound"> <LayoutTemplate> <table runat="server" id="table2"> <tr id="Tr1" runat="server" class="Tr1 qbe"> <th id="Th11" runat="server" class="ThValueToMap">Valeur à mapper</th> <th id="Th12" runat="server" class="ThMapChoice">Choix de mappage</th> </tr> <tr runat="server" id="itemPlaceholder" > </tr> </table> </LayoutTemplate> <ItemTemplate> <tr id="Tr2" runat="server" class="Tr2"> <td id="Td21" align="right" runat="server" class="Td21"> <asp:Label ID="lblValue" runat="server" Text='<%# Eval("Lib") %>'></asp:Label> </td> <td id="Td22" runat="server" class="Td22"> <asp:DropDownList ID="ddlValuesForMapping" runat="server" AutoPostBack="false" CssClass="ddlValuesForMapping"></asp:DropDownList> </td> </tr> <tr id="separation"> <td colspan="5"> <hr /> </td> </tr> </ItemTemplate> </asp:ListView> </div>
Voilà j'aimerais changer "Valeur à mapper" et "Choix de mappage", dans mon code behind.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 <LayoutTemplate> <table runat="server" id="table2"> <tr id="Tr1" runat="server" class="Tr1 qbe"> <th id="Th11" runat="server" class="ThValueToMap">Valeur à mapper</th> <th id="Th12" runat="server" class="ThMapChoice">Choix de mappage</th> </tr> <tr runat="server" id="itemPlaceholder" > </tr> </table> </LayoutTemplate>
Vous avez une idée ?
Merci de votre aide.
Partager