The RadComboBox control is posting back twice in the following scenario.
-2 combo boxes
-both configured in checkbox mode
-both of which are configured to post back automatically
-AJAXified using the RadAjaxManager control with the first combo box having the second as an updated control (changing the selection in combo box one updates the items in combo box 2)
-empty message is set, oddly enough the problem doesn't happen when the empty message is not set
I did some stepping through the Telerik client code and can see that a postback is done twice for the TextChanged event, once when the _selectItemOnBlur method is called (even though it is checkbox mode) and then again after that. When the control is working normally it doesn't do the second postback. The effect of the second postback causes a full postback while the first is a partial. The problem doesn't start until after the second change to checked list.
To reproduce:
-check 1, 2, and 3 in the 2nd combo box and click off the combo box so that it posts back
-uncheck 3 in the 2nd combo box and click off the combo box so that it posts back
-at this point it should do 2 post backs as seen by putting a breakpoint in the ramAjaxManager_OnRequestStart event handler or in the code behind (one of which is actually not even detected as postback by ASP.NET)
Controls version: 2013.2.717.40
Browser tested: IE 11
<telerik:RadAjaxManager ID="ramAjaxManager" ClientEvents-OnRequestStart="ramAjaxManager_OnRequestStart" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="ddlTestOne">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ddlTestTwo" />
<telerik:AjaxUpdatedControl ControlID="ltrTest" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="ddlTestTwo">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ltrTest" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadComboBox ID="ddlTestOne" EmptyMessage="Test 1" CheckBoxes="True" OnSelectedIndexChanged="lstTestOne_OnSelectedIndexChanged" AutoPostBack="True" runat="server" />
<telerik:RadComboBox ID="ddlTestTwo" EmptyMessage="Test 2" CheckBoxes="True" OnSelectedIndexChanged="lstTestTwo_OnSelectedIndexChanged" AutoPostBack="True" runat="server" />
<asp:Literal ID="ltrTest" runat="server" />
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindTestOneData();
BindTestTwoData();
}
}
protected void lstTestOne_OnSelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
ltrTest.Text = String.Format("lstTestOne_OnSelectedIndexChanged: Old text: {0}, New text: {1}", e.OldText, e.Text);
}
protected void lstTestTwo_OnSelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
ltrTest.Text = String.Format("lstTestTwo_OnSelectedIndexChanged: Old text: {0}, New text: {1}", e.OldText, e.Text);
}
public void BindTestOneData()
{
ddlTestOne.DataSource = Enumerable.Range(1, 8).Select(r => new { Value = r, Text = r });
ddlTestOne.DataValueField = "Value";
ddlTestOne.DataTextField = "Text";
ddlTestOne.DataBind();
}
public void BindTestTwoData()
{
ddlTestTwo.DataSource = Enumerable.Range(1, 8).Select(r => new { Value = r, Text = r });
ddlTestTwo.DataValueField = "Value";
ddlTestTwo.DataTextField = "Text";
ddlTestTwo.DataBind();
}
-2 combo boxes
-both configured in checkbox mode
-both of which are configured to post back automatically
-AJAXified using the RadAjaxManager control with the first combo box having the second as an updated control (changing the selection in combo box one updates the items in combo box 2)
-empty message is set, oddly enough the problem doesn't happen when the empty message is not set
I did some stepping through the Telerik client code and can see that a postback is done twice for the TextChanged event, once when the _selectItemOnBlur method is called (even though it is checkbox mode) and then again after that. When the control is working normally it doesn't do the second postback. The effect of the second postback causes a full postback while the first is a partial. The problem doesn't start until after the second change to checked list.
To reproduce:
-check 1, 2, and 3 in the 2nd combo box and click off the combo box so that it posts back
-uncheck 3 in the 2nd combo box and click off the combo box so that it posts back
-at this point it should do 2 post backs as seen by putting a breakpoint in the ramAjaxManager_OnRequestStart event handler or in the code behind (one of which is actually not even detected as postback by ASP.NET)
Controls version: 2013.2.717.40
Browser tested: IE 11
<telerik:RadAjaxManager ID="ramAjaxManager" ClientEvents-OnRequestStart="ramAjaxManager_OnRequestStart" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="ddlTestOne">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ddlTestTwo" />
<telerik:AjaxUpdatedControl ControlID="ltrTest" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="ddlTestTwo">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ltrTest" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadComboBox ID="ddlTestOne" EmptyMessage="Test 1" CheckBoxes="True" OnSelectedIndexChanged="lstTestOne_OnSelectedIndexChanged" AutoPostBack="True" runat="server" />
<telerik:RadComboBox ID="ddlTestTwo" EmptyMessage="Test 2" CheckBoxes="True" OnSelectedIndexChanged="lstTestTwo_OnSelectedIndexChanged" AutoPostBack="True" runat="server" />
<asp:Literal ID="ltrTest" runat="server" />
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindTestOneData();
BindTestTwoData();
}
}
protected void lstTestOne_OnSelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
ltrTest.Text = String.Format("lstTestOne_OnSelectedIndexChanged: Old text: {0}, New text: {1}", e.OldText, e.Text);
}
protected void lstTestTwo_OnSelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
ltrTest.Text = String.Format("lstTestTwo_OnSelectedIndexChanged: Old text: {0}, New text: {1}", e.OldText, e.Text);
}
public void BindTestOneData()
{
ddlTestOne.DataSource = Enumerable.Range(1, 8).Select(r => new { Value = r, Text = r });
ddlTestOne.DataValueField = "Value";
ddlTestOne.DataTextField = "Text";
ddlTestOne.DataBind();
}
public void BindTestTwoData()
{
ddlTestTwo.DataSource = Enumerable.Range(1, 8).Select(r => new { Value = r, Text = r });
ddlTestTwo.DataValueField = "Value";
ddlTestTwo.DataTextField = "Text";
ddlTestTwo.DataBind();
}