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

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

3 Answers 67 Views
Window
This is a migrated thread and some comments may be shown as answers.
Vandana
Top achievements
Rank 1
Vandana asked on 26 Dec 2019, 08:44 PM

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

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 31 Dec 2019, 02:31 PM

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.
0
Vandana
Top achievements
Rank 1
answered on 03 Jan 2020, 08:28 PM

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

 

0
Rumen
Telerik team
answered on 06 Jan 2020, 08:59 AM

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.
Tags
Window
Asked by
Vandana
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Vandana
Top achievements
Rank 1
Share this question
or