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

Keep focus while opening modal

5 Answers 277 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jhony
Top achievements
Rank 1
Jhony asked on 06 Jul 2017, 03:32 PM

Hello,

I need to open a modal when the user clicks on an editable cell.

I added in the cell template editable a button that opens a modal, but when it opens soon it closes.

Is there any way to keep the field editable while the modal is open?

5 Answers, 1 is accepted

Sort by
0
Preslav
Telerik team
answered on 10 Jul 2017, 08:26 AM
Hello Jhony,

Based on the provided information, I am not sure what is the exact scenario of the project. Thus, please excuse me if something below is not on the topic.

I assume that after opening a modal window, the edited cell looses focus and is no longer editable. Correct me if I am wrong.

To overcome this, you could detect the closing window event. In the event handler, manually edit the cell by invoking the editCell grid method:
Regards,
Preslav
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Jhony
Top achievements
Rank 1
answered on 14 Jul 2017, 12:57 PM
Hi, good morning!
We are trying to play a grid component with an editable cell plus a zoom into the same cell.
When I click in the cell the zoom button was shown, the problem is, when I take mouse cursor off the editable cell to click the zoom button, the modal of the zoom open and close very quickly as you can see in the gif example that I'm sending an attachment.
And I don't know how to fix this it.

Thank you for your attencion.
0
Preslav
Telerik team
answered on 17 Jul 2017, 08:18 AM
Hello Jhony,

Thank you for elaborating on the issue. However, I am still not able to understand what is the exact problem.

Could you please tell us, is the problem the fact that the window closes immediately or the fact that once the window closes, the cell is no longer in edit mode? In both cases, please provide a runnable Dojo that will help me fully understand the scenario and provide assistance to the best of my knowledge.

In the meantime, I believe that you might be interested in checking the "Add Custom Column Popup Editor" article:

Regards,
Preslav
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Jhony
Top achievements
Rank 1
answered on 18 Jul 2017, 05:05 PM
The problem is that when I open the modal the editable cell loses focus, this closes the modal. I want the modal to remain open, so for this I want to keep the cell editable when opening the modal. Is there any way?
0
Preslav
Telerik team
answered on 20 Jul 2017, 02:56 PM
Hi Jhony,

Thank you for the elaboration once again. I believe that I was able to fully understand the scenario.

The only possible solution might be using inline editing mode. That way, the cell will not close once it looses focus.

I hope this information helps.


Regards,
Preslav
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Jhony
Top achievements
Rank 1
Answers by
Preslav
Telerik team
Jhony
Top achievements
Rank 1
Share this question
or