Hello, I hope community and Telerik staff will help me to understand if I want too much from RadAjaxManager, and point me what I'm doing wrong.
Trying to explain to support person my problem for almost 4 days now, and still did not get any clear answer, or confirmation that behavior I'm expecting is bug or "by-design".
Anyway, I'm having RadScriptManager and RadAjaxManager controls created on my master page, and then I have this on my content page:
and this is code I have in code-behind
As you can see I have 2 buttons, and I defined for them 2 AjaxSettings inside RadAjaxManagerProxy
So, according to these settings I'm expecting the following behavior:
1. When button cmdButton1 is clicked - RadAjaxManager should refresh my pnl1 and pnl2 Panels
2. When button cmdButton2 is clicked - RadAjaxManager should only refresh my pnl2 Panel.
However, when I'm clicking cmdButton2 - BOTH panels beeing refreshed.
If I remove AjaxSetting for button1 and click button2 - things starting work as expected (e.g. pnl1 is not refreshing)
So it seems that AjaxSetting for button1 somehow forces RadAjaxManager to refresh pnl1, even when button1 was not clicked.
Is this expected? Or bug? What you guys think? What behavior you would expect?
I gave up trying to explain why I think this is bug to support person :(
Maybe I don't understand something?
Thanks!
Trying to explain to support person my problem for almost 4 days now, and still did not get any clear answer, or confirmation that behavior I'm expecting is bug or "by-design".
Anyway, I'm having RadScriptManager and RadAjaxManager controls created on my master page, and then I have this on my content page:
<
asp:Content
ID
=
"Content2"
ContentPlaceHolderID
=
"MainContent"
runat
=
"server"
>
<
telerik:RadAjaxManagerProxy
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"cmdButton1"
EventName
=
"Click"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"pnl1"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"pnl2"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"cmdButton2"
EventName
=
"Click"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"pnl2"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>
<
asp:Button
ID
=
"cmdButton1"
runat
=
"server"
Text
=
"Button 1"
OnClick
=
"cmdButton1_Click"
/>
<
asp:Panel
ID
=
"pnl1"
runat
=
"server"
>
<
asp:Button
ID
=
"cmdButton2"
runat
=
"server"
Text
=
"Button 1"
OnClick
=
"cmdButton2_Click"
/>
<
asp:Label
ID
=
"lblPnl1"
runat
=
"server"
/>
</
asp:Panel
>
<
asp:Panel
ID
=
"pnl2"
runat
=
"server"
>
<
asp:Label
ID
=
"lblPnl2"
runat
=
"server"
/>
</
asp:Panel
>
</
asp:Content
>
and this is code I have in code-behind
protected
void
Page_Load(
object
sender, EventArgs e)
{
lblPnl1.Text = lblPnl2.Text = DateTime.Now.ToString();
}
protected
void
cmdButton1_Click(
object
sender, EventArgs e)
{
//do nothing Page_Load will update content of labels
}
protected
void
cmdButton2_Click(
object
sender, EventArgs e)
{
//do nothing Page_Load will update content of labels
}
As you can see I have 2 buttons, and I defined for them 2 AjaxSettings inside RadAjaxManagerProxy
So, according to these settings I'm expecting the following behavior:
1. When button cmdButton1 is clicked - RadAjaxManager should refresh my pnl1 and pnl2 Panels
2. When button cmdButton2 is clicked - RadAjaxManager should only refresh my pnl2 Panel.
However, when I'm clicking cmdButton2 - BOTH panels beeing refreshed.
If I remove AjaxSetting for button1 and click button2 - things starting work as expected (e.g. pnl1 is not refreshing)
So it seems that AjaxSetting for button1 somehow forces RadAjaxManager to refresh pnl1, even when button1 was not clicked.
Is this expected? Or bug? What you guys think? What behavior you would expect?
I gave up trying to explain why I think this is bug to support person :(
Maybe I don't understand something?
Thanks!