Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
ProgramAreaCombobox.DataSource = GetListProgramAreasHasFeature()
ProgramAreaCombobox.DataBind()
'<---- EdtMode
If Not (TypeOf DataItem Is Telerik.Web.UI.GridInsertionObject) Then
Dim a As Business.ReviewCommitteeAmendment = CType(_dataItem, Business.ReviewCommitteeAmendment)
If Not a Is Nothing Then
With AgreementAmendmentComboBox
.DataSource = GetAgreementAmendments(a.ProgramAreaId)
.DataBind()
.FindItemByValue(a.AmendmentId).Selected = True '<-------- FIRES
.Enabled = True
End With
End If
End If
'<---- END EdtMode
End Sub
<MasterTableView CommandItemDisplay="Bottom" DataKeyNames="ID,AmendmentId,AgreementAmendmentID" EditMode="PopUp" > <EditFormSettings> <PopUpSettings Modal="true" ZIndex="100010" /> </EditFormSettings> </Columns> <EditFormSettings UserControlName="UserControls/ReviewCommittee/ReviewCommitteeAddEditAmendmentControl.ascx" EditFormType="WebUserControl"> <EditColumn UniqueName="EditCommandColumn1"> </EditColumn> </EditFormSettings> </MasterTableView>USERCONTROL<table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none" style="border-collapse: collapse;"> <tr class="EditFormHeader"> <td colspan="2"> <b><%# GetTranslation("ReviewCommitteeAgreementAmendments", True)%></b> </td> </tr> <tr> <td> <table id="Table3" border="0"> <tr> <td><strong><%# GetTranslation("ProgramArea", True)%></strong> </td> <td> <telerik:RadComboBox ID="ProgramAreaCombobox" runat="server" DropDownWidth="350" AutoPostBack="true" CausesValidation="false" SelectedValue='<%# DataBinder.Eval(Container, "DataItem.ProgramAreaId") %>' ZIndex="100011" EmptyMessage='<%#GetTranslation("PleaseSelect", False)%>' Width="250" LoadingMessage="Loading ..."> </telerik:RadComboBox> </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td><strong><%# GetTranslation("Amendment", True)%></strong> </td> <td> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <telerik:RadComboBox ID="AgreementAmendmentComboBox" runat="server" DropDownWidth="500" ZIndex="100011" SelectedValue='<%# DataBinder.Eval(Container, "DataItem.AgreementAmendmentId") %>' EmptyMessage='<%#GetTranslation("PleaseSelect", False)%>' Width="250" LoadingMessage="Loading ..." Enabled="false"> </telerik:RadComboBox> <asp:RequiredFieldValidator ID="reqAgreementAmendment" runat="server" ErrorMessage='<%#GetTranslation("Required", False)%>' ControlToValidate="AgreementAmendmentComboBox" ForeColor="Red" Font-Size="X-Small" Font-Bold="true" Display="Dynamic" > </asp:RequiredFieldValidator> </ContentTemplate> </asp:UpdatePanel> </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td> <strong><%# GetTranslation("ReviewOrder", True)%></strong> </td> <td> <asp:TextBox ID="ReviewOrder" runat="server" Width="70" Text='<%# DataBinder.Eval(Container, "DataItem.Order") %>'></asp:TextBox> <asp:RequiredFieldValidator ID="reqReviewOrder" runat="server" ErrorMessage='<%#GetTranslation("Required", False)%>' ControlToValidate="ReviewOrder" ForeColor="Red" Font-Size="X-Small" Font-Bold="true" Display="Dynamic" > </asp:RequiredFieldValidator> </td> </tr> </table> <tr> <td colspan="2"></td> </tr> <tr> <td></td> <td></td> </tr> <tr> <td align="right" colspan="2"> <asp:Button ID="btnUpdate" Text='<%#GetTranslation("Update", False)%>' runat="server" CommandName="Update" Visible='<%# Not (TypeOf DataItem Is Telerik.Web.UI.GridInsertionObject) %>'></asp:Button> <asp:Button ID="btnInsert" Text='<%#GetTranslation("Insert", False)%>' runat="server" CommandName="PerformInsert" Visible='<%# (TypeOf DataItem Is Telerik.Web.UI.GridInsertionObject) %>'></asp:Button> <asp:Button ID="btnCancel" Text='<%#GetTranslation("Cancel", False)%>' runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button> </td> </tr></table>USERCONTROL
The Page Load fires, the Selected = tru Fires but when the page Loads, my Combos both say 'Please Select'. If Not Page.IsPostback does not help as every click is a Postback.
I have the exact same probem here
Private Sub ProgramAreaCombobox_SelectedIndexChanged(sender As Object, e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles ProgramAreaCombobox.SelectedIndexChanged If Not String.IsNullOrWhiteSpace(e.Value) Then AgreementAmendmentComboBox.DataSource = GetAgreementAmendments(ProgramAreaCombobox.SelectedValue) AgreementAmendmentComboBox.DataBind() AgreementAmendmentComboBox.Enabled = True End If End Subbecuase the code always sees e.value as nothing.
Ideas?