RadWindow - Not reflecting size and other properties set on server side

4 posts, 0 answers
  1. Vandana
    Vandana avatar
    3 posts
    Member since:
    May 2018

    Posted 26 Dec 2019 Link to this post

    Hi,

    We are using RadWindow as modals in our appliction. We have overload RadWindow in a custom control and then use that control thoughout our application. So it worked fantastic but recently something went wrong. All the modals are opening as a tiny modal and have url in status bar and other button in titlebar. which we didn't have initially. So the modal is not applying any properties we have set on server side. It looks like it is creating modal with default settings.

     

    Here is our code for overload:

     public class ECxModalWindow : RadWindow
        {
            protected override void OnInit(EventArgs e)
            {
                ReloadOnShow = true;
                ShowContentDuringLoad = false;
                VisibleStatusbar = false;
                Title = "";
                Behaviors = WindowBehaviors.Close | WindowBehaviors.Move;
                AutoSize = false;
                Modal = true;
                OnClientShow = "InitWindow";
                CenterIfModal = true;
                if (Width.IsEmpty)
                {
                    Width = new Unit(650, UnitType.Pixel);
                }
                if (Height.IsEmpty)
                {
                    Height = new Unit(300, UnitType.Pixel);
                }
                base.OnInit(e);
            }

     

    Here is the code we use for opening modal:

    function ShowModal(sender, args, modalName) {
        var url;
        if (typeof(args.get_commandArgument) != "undefined") {
            url = args.get_commandArgument();
            modalName = args.get_commandName();
        } else {
            url = args;
        }
        AdjustContentPosition();
        window.radopen(url, modalName);
     //   var oWnd = window.radopen(url,modaln); 
        if (typeof(args.set_cancel) != "undefined") {
            args.set_cancel(true);
        } else {
            return false;
        }
    }

    HEre is how I declare it:

     <telerik:RadWindowManager ID="windowManager" runat="server" VisibleStatusbar="false">
                <Windows>
                    <econometrix:ECxModalWindow ID="NotifyModal" runat="server" Height="480px" Width="440px">
                    </econometrix:ECxModalWindow>

     

    Please let me know what can be done to fix this issue.

     

    Thanks,

    Vandana

  2. Rumen
    Admin
    Rumen avatar
    14324 posts

    Posted 31 Dec 2019 Link to this post

    Hi Vandana,

    Can you please shed more light on what has changed and thus led to the problem? For example have you updated the version of Telerik.Web.UI.dll or the browser?

    On a side note please be aware that creating custom controls/classes is not supported even if they are inherited from Telerik controls directly. We recommend implementing UserControls  where the core functionality of the Telerik controls stays untouched and not customized.

    Best Regards,
    Rumen
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Vandana
    Vandana avatar
    3 posts
    Member since:
    May 2018

    Posted 03 Jan in reply to Rumen Link to this post

    Hi,

    Thanks for the response.We updated telerik version from 2017.1.228 to 2019.2.514. However we resolved this issue by finding the right window through right window manager. The two window managers we had on the page was creating this issue. 

     

    We will keep in mind about using usercontrols instead of inherited controls.

     

    Thanks,

    Vandana

     

  4. Rumen
    Admin
    Rumen avatar
    14324 posts

    Posted 06 Jan Link to this post

    Happy New Year, Vandana!

    Thank you for the shared information!

    I am glad that you've found out how to resolve the issue!

    Please keep up the good work and let us know in case of new trouble with the AJAX controls!

    Best Regards,
    Rumen
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top