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

7 posts, 1 answers
  1. heyrohit
    heyrohit avatar
    10 posts
    Member since:
    Feb 2010

    Posted 25 Feb 2013 Link to this post

    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
  2. heyrohit
    heyrohit avatar
    10 posts
    Member since:
    Feb 2010

    Posted 27 Feb 2013 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 28 Feb 2013 Link to this post

    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.
  5. heyrohit
    heyrohit avatar
    10 posts
    Member since:
    Feb 2010

    Posted 18 Mar 2013 Link to this post

    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
  6. Answer
    Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 20 Mar 2013 Link to this post

    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.
  7. heyrohit
    heyrohit avatar
    10 posts
    Member since:
    Feb 2010

    Posted 15 Jul 2013 Link to this post

    Hello Maria,

    Any update on this. Was a fix made available?

    Thanks
    Rohit Kamble
  8. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 18 Jul 2013 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017