Hi,
I'm using a asp:DetailsView with different fields, and one of them is :
| <asp:TemplateField HeaderText="Type d'affaire"> |
| <ItemTemplate> |
| <%#Eval("TypeAffaire.Libelle")%> |
| </ItemTemplate> |
| <EditItemTemplate> |
| <telerik:RadComboBox ID="RadComboBoxTypeAffaire" runat="server" Skin="Hay" |
| DataSourceID="LinqDataSourceTypeAffaire" DataTextField="Libelle" |
| DataValueField="IdTypeAffaire" SelectedValue='<%# Bind("TypeAffaire.IdTypeAffaire") %>'> |
| </telerik:RadComboBox> |
| <asp:LinqDataSource ID="LinqDataSourceTypeAffaire" runat="server" |
| ContextTypeName="isiweb.Common.DAO.LinqToSqlDataContext" |
| TableName="TypeAffaires"> |
| </asp:LinqDataSource> |
| </EditItemTemplate> |
| </asp:TemplateField> |
When I switch to edit mode, the comboBox take the right value with the SelectedValue='<%# Bind("TypeAffaire.IdTypeAffaire") %>'> After, I change de value... And I click on Update. I go on OnItemUpdated to see what happen and I see that 1 row is affected... It's great...
But, when I'm back to the 'normal' mode, the value of the combobox go back to the old value. :o
Do you fine a problem with my code ?
Thank you,
Jean-Yves