This is a migrated thread and some comments may be shown as answers.

Control's Visible property is set to false if it is added to a RadAjaxManagerProxy

6 Answers 154 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
heyrohit
Top achievements
Rank 1
heyrohit asked on 25 Feb 2013, 12:38 PM
Hello,

I have created few custom controls and have added it to the RadAjaxManagerProxy control. We implement some logic when the control's visible property is set. What I noticed is after adding my control 'txtFirstName' to the RadAjaxManagerProxy, the visible property is set to 'false'. This is causing some undesired actions in our app. The visible property is not set by the code. I have attached the stacktrace for reference. Please assist.

<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnSubmit">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="txtFirstName" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

Thanks
Rohit Kamble

6 Answers, 1 is accepted

Sort by
0
heyrohit
Top achievements
Rank 1
answered on 27 Feb 2013, 06:44 AM
Hello all,

Has anybody noticed this behavior? What could be the possible cause and a solution?

Incidentally i noticed when the controls are moved to an UpdatePanel, the visible property is not set on page load. Any thoughts?

Thanks
Rohit
0
Maria Ilieva
Telerik team
answered on 28 Feb 2013, 11:12 AM
Hi Rohit,

I tried to replicate the described issue locally but to no avail. Therefore could you please share you page markup as well as the related code behind? Thus we will be able to inspect the exact ajax settings you have on the page and the server logic you are implementing and do our best to isolate the root cause of the issue.


Kind regards,
Maria Ilieva
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
heyrohit
Top achievements
Rank 1
answered on 18 Mar 2013, 05:27 AM
Apologies Maria for the late response.

Pasted below is the code snippet. Place a breakpoint in the setter of TextBox's Visible property. At one point the visible property is set as false. But when RadAjaxManager is commented in the aspx, the Visible property is not set to false.

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<tel:RadScriptManager runat="server" ID="scrManager"></tel:RadScriptManager>
    <tel:RadAjaxManager runat="server" ID="radAjaxManager">
        <AjaxSettings>
            <tel:AjaxSetting AjaxControlID="button">
                <UpdatedControls>
                    <tel:AjaxUpdatedControl ControlID="textBox" />
                </UpdatedControls>
            </tel:AjaxSetting>
        </AjaxSettings>
    </tel:RadAjaxManager>
    <test:TextBox runat="server" ID="textBox" Visible="true" />
    <asp:Button runat="server" ID="button" Text="Submit" />
</asp:Content>

namespace AjaxManager.Controls
{
    [ToolboxData(@"<{0}:TextBox runat=server />")]
    public class TextBox : System.Web.UI.WebControls.TextBox
    {
        bool _visible;
        public TextBox()
            : base()
        {
        }
 
        public override bool Visible
        {
            get
            {
                return _visible;
            }
            set
            {
                _visible = value;
            }
        }   
    }
}



Thanks
Rohit
0
Accepted
Maria Ilieva
Telerik team
answered on 20 Mar 2013, 02:50 PM
Hello Rohit,

Thank you for getting back to us.

After further clarifying the issue and discuss with our developers it appears that you are correct and this is the default behavior for the RadAjaxManager control. I already logged this issue in our tracking system so the dev team could revise the RadAjaxManager code and do their best to modify this behavior.


All the best,
Maria Ilieva
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
heyrohit
Top achievements
Rank 1
answered on 15 Jul 2013, 09:56 AM
Hello Maria,

Any update on this. Was a fix made available?

Thanks
Rohit Kamble
0
Maria Ilieva
Telerik team
answered on 18 Jul 2013, 08:09 AM
Hello Rohit,

Unfortunately a fix for the discussed issue was not added in the SP release uploaded yesterday. I'm increasing the item's priority so that our dev team could force their effort in its fixing for the next official release.
Excuse us for any inconvenience this may lead.

Regards,
Maria Ilieva
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Ajax
Asked by
heyrohit
Top achievements
Rank 1
Answers by
heyrohit
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or