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

Prevent Closing container

2 Answers 90 Views
PopupEditor
This is a migrated thread and some comments may be shown as answers.
pierre-jean
Top achievements
Rank 1
Veteran
Iron
pierre-jean asked on 12 Sep 2020, 06:51 PM

Hello

I have a popunEditor that opens a Container in which I have a filedialog to open a file.

as soon as I select the file the container closes (see attached screen copy)

Is there a way to prevent this to happen and close only on demand ?

 

2 Answers, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 14 Sep 2020, 04:14 PM

Hello, Pierre-jean,

RadPopupEditor offers the PopupClosing event which is triggered right before the associated RadPopupContainer closes. Through its arguments, it is allowed to cancel closing the container. Thus, you can raise a flag and cancel the event if needed. Please refer to the code snippet below:

bool flag = true; 
this.radPopupEditor1.PopupClosing += this.RadPopupEditor1_PopupClosing;
private void RadPopupEditor1_PopupClosing(object sender, RadPopupClosingEventArgs args)
{
    if (flag)
    {
        args.Cancel = true;
    }
    
}

I hope this helps. Should you have other questions do not hesitate to ask.

Regards,
Nadya
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
pierre-jean
Top achievements
Rank 1
Veteran
Iron
answered on 16 Sep 2020, 01:14 PM

OK 

got it

Thanks a lot for the recommendation

Pierre-Jean

Tags
PopupEditor
Asked by
pierre-jean
Top achievements
Rank 1
Veteran
Iron
Answers by
Nadya | Tech Support Engineer
Telerik team
pierre-jean
Top achievements
Rank 1
Veteran
Iron
Share this question
or