Bonjour ,
dans une colonne template d’un datagrid, je sais
afficher un champ :
<asp:TextBox Enabled=“false” ID=“TBl1c1” runat=“server” Text=’<%# Bind("[Montant 1]", “{0:C}”) %>’ Width=“79px”></asp:TextBox>
faire une addition :
<asp:TextBox Enabled=“false” ID=“TBl1c1” runat=“server” Text=’<%=1+1 %>’ Width=“79px”></asp:TextBox>
Mais je n’arrive pas à additionner mon champ à une autre valeur (grrrrrrr). Un truc genre
<asp:TextBox Enabled=“false” ID=“TBl1c1” runat=“server” Text=’<%# =concert.toint32(Bind("[Montant 1]"))*0.186 %>’ Width=“79px”></asp:TextBox>
B)
======================Solution============================
Solution (mais ca m’a l’air un peu crado)
<%# Convert.ToString(Convert.ToDecimal(Eval(“Montant 1”)) + Convert.ToDecimal(Eval(“Montant 2”))) %>
Il suffit de poster ici pour trouver