Ciao raga!
Ho provato l'edit con DataGrid e fin qui tutto b...
Poi ho provato con DataList...NIENTE!
Quando clicco sul pulsante edit la pagina viene rispedita al server ma l'evento edit non viene generato!
Questo è il codice che ho usato:
<asp:datalist id="listCustomer" style="Z-INDEX: 101; LEFT: 15px; POSITION: absolute; TOP: 19px" runat="server" CellPadding="5" BorderWidth="3px" BorderStyle="Ridge" Height="556" Width="189" Font-Size="XX-Small">
<ItemTemplate>
Indirizzo:
<%# Container.DataItem("IDARTICOLO") %>
Città:
<%# Container.DataItem("IDVERSIONE") %>
(<%# Container.DataItem("PREZZOVENDITA")%>)
<asp:Button CommandName="EditCommand" Text="Edit" Runat="server" />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox BackColor=#ffff00 Text='<%# Container.DataItem("IDARTICOLO") %>' ID=txtIDARTICOLO Runat=server>
</asp:TextBox>
Indirizzo:
<asp:TextBox BackColor=#ffff00 Text='<%# Container.DataItem("IDVERSIONE") %>' ID="txtIDVERSIONE" Runat=server>
</asp:TextBox>
Città:
<asp:TextBox Text='<%# Container.DataItem("PREZZOVENDITA") %>' ID="txtPREZZOVENDITA" Runat=server>
</asp:TextBox>
<asp:Button CommandName="Update" Text="Update" Runat="server"></asp:Button>
<asp:Button CommandName="Cancel" Text="Cancel" runat="server"></asp:Button>
</EditItemTemplate>