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

Modal on Modal

3 Answers 157 Views
Window
This is a migrated thread and some comments may be shown as answers.
Giampaolo
Top achievements
Rank 1
Veteran
Giampaolo asked on 28 Apr 2020, 09:44 AM

Hi

I need to use a modal window with a grid inside that

But I need to show a modal window on error when I edit items on grid

Modal on Modal not work: the second window is not visible.

Any solution ?

Tnx

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 28 Apr 2020, 11:23 AM

Hi Giampaolo,

You can Follow the implementation of such a feature here: https://feedback.telerik.com/blazor/1407791-support-for-multiple-nested-modal-windows.

 

Regards,
Marin Bratanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Giampaolo
Top achievements
Rank 1
Veteran
answered on 28 Apr 2020, 12:42 PM

OK tnx

But ad idea can be to hide the original window and open another one

But how is possible leave the grid in edit mode ?

And after that continue with edit the cell ?

0
Marin Bratanov
Telerik team
answered on 28 Apr 2020, 03:49 PM

Hello Giampaolo,

If you hide the first dialog with the Visible parameter, it will remove its child components from the render tree and Blazor will dispose them, so you couldn't keep the grid in it "alive". Perhaps you can try to add a Class to it that is conditional, and raise a flag when the grid goes into edit/insert mode (that is, when the second modal is to show up) and try to set its display CSS rule to none.

I posted a sample workaround like this in the feedback portal, so you can check if it will work out for you. Perhaps using a custom popup form for the grid can get things done (link). Or, maybe you could avoid a second modal by using a custom inline form (link) or the inline editing (link).

Regards,
Marin Bratanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Jeff
Top achievements
Rank 1
commented on 27 Apr 2021, 10:08 PM

Can you post a link to the "feedback portal" for the workaround? I have been trying to hide a modal window but it appears to force itself to the top of the dom. I have managed to do it with a non-modal window but wondering how a modal might work. There is always reloading the data every time the window is show :)(
Marin Bratanov
Telerik team
commented on 28 Apr 2021, 05:53 AM

Hi Jeff,

Here is the link to the original request for the original problem in this thread: https://feedback.telerik.com/blazor/1407791-support-for-multiple-nested-modal-windows.

The feature is already available in our latest release and I recommend you simply upgrade to it (2.23.0 at the time of writing).

As for hiding the window which seems to be what you need to behave differently - it is supposed to destroy all its content, this is how Blazor is supposed to operate. Implementing the following feature will let you prevent the disposal of the content: https://feedback.telerik.com/blazor/1496745-minimizing-the-window-should-be-done-with-css-only-to-avoid-lost-content. I've added your Vote to it to raise its priority, and it contains a workaround too.

--Marin

Tags
Window
Asked by
Giampaolo
Top achievements
Rank 1
Veteran
Answers by
Marin Bratanov
Telerik team
Giampaolo
Top achievements
Rank 1
Veteran
Share this question
or