I have a RadWindow configured to be opened via a "username" hyperlink on my master page - this RadWindow is setup to allow impersonation of other users for the purpose of troublshooting issues. The first RadComboBox is populated server side while the second combo box is dynamically populated but is tied to the selected value from the first RadComboBox. For some reason when I change the selected value in the first RadComboBox that value is not being transferred back to the server but dynamic data I type into the second RadComboBox which has EnableLoadOnDemand set to true does - since both controls are on the RadWindow I can see no reason why the updated selected value (altered from when combo was first loaded) is not - below you will find the markup for the RadWindow and the server side event for the second RadComboBox that is using the selected value from the first - any thoughts/help would be much appreciated as I am pulling my hair out - please note that I've stepped through the code and the code that loads the first combo box is not being called on postback (which would reset the combobox) so I don't think that is the issue.
<telerik:RadWindow ID="ImpersonationWindow" runat="server" Height="200px" Width="500px" IconUrl="/Content/Images/user16.png" Animation="Fade" Modal="true" Title="User Impersonation" Behaviors="Close" KeepInScreenBounds="true" ReloadOnShow="false" DestroyOnClose="false"> <ContentTemplate> <div class="row"> <span class="label" style="width: 30%;"> <span class="small-red-bold-label">Business Unit:</span> </span> <span class="field" style="width: 65%;"> <telerik:RadComboBox ID="ImpersonatedBusinessUnitRadComboBox" runat="server" Width="275px" CausesValidation="false" DataTextField="FormalName" DataValueField="CentralBusinessUnitNo"> </telerik:RadComboBox> </span> </div> <div class="row"> <span class="label" style="width: 30%;"> <span class="small-red-bold-label">Employee:</span> </span> <span class="field" style="width: 65%;"> <telerik:RadComboBox ID="ImpersonatedEmployeeRadComboBox" runat="server" Width="275px" Height="200px" CausesValidation="false" DataValueField="EmpID" DataTextField="FullName" ShowDropDownOnTextboxClick="false" EnableLoadOnDemand="true" MarkFirstMatch="false" ItemRequestTimeout="500" EmptyMessage="Type Employee Name..." MinFilterLength="2" OnItemsRequested="ImpersonatedEmployeeRadComboBox_ItemsRequested"> </telerik:RadComboBox> </span> </div> <div class="row"><span class="label"></span><span class="field"></span></div> <div class="row"> <span class="label" style="width: 48%;"> <asp:Button ID="ImpersonateButton" runat="server" Text="Impersonate" Width="100px" OnClick="ImpersonateButton_Click" /> </span> <span class="field" style="width: 48%;"> <asp:Button ID="ResetButton" runat="server" Text="Reset" Width="100px" OnClick="ResetButton_Click" /> </span> </div> </ContentTemplate> </telerik:RadWindow>
protected void ImpersonatedEmployeeRadComboBox_ItemsRequested(object sender,RadComboBoxItemsRequestedEventArgs e) { if(!string.IsNullOrEmpty(e.Text)) { if(e.Text.Length >= 2) { List<FindEmployeeView> employees = new List<FindEmployeeView>(); // get data from data context using(CommonDataContext context = new CommonDataContext(ConfigurationManager.ConnectionStrings["CEO"].ConnectionString)) { employees = context.FindEmployeesByFullName( 0, e.Text, AnyOrganizationFilter, "|" + ImpersonatedBusinessUnitRadComboBox.SelectedValue + "|", AnyOrganizationFilter, 1).ToList(); } // databind ImpersonatedEmployeeRadComboBox.DataSource = employees; ImpersonatedEmployeeRadComboBox.DataBind(); } } }