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

Possibility to remove 'x' for dialog closing

3 Answers 3537 Views
ModalView
This is a migrated thread and some comments may be shown as answers.
Ján
Top achievements
Rank 1
Ján asked on 04 Aug 2017, 08:22 AM

Hello,

i have a feature request for Kendo UI for Angular 2. It would be nice to have possibility to create dialogs without 'x' in the top right corner. For example if one wants to create a confirmation dialog hat only has 'yes'/no  buttons that user has to choose from, without possibility to dismiss dialog with 'x'.

3 Answers, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 08 Aug 2017, 06:12 AM
Hi Ján,

Thank you for the feedback. We have not included such an option, as there is a relatively straightforward approach to achieve the desired layout via CSS only:

styles: [`
      >>> .k-window-actions.k-dialog-actions {
        display: none;
      }
    `]

http://plnkr.co/edit/lvv2srQ61lm0fw471ac7?p=preview

The whole title bar can also be removed altogether by omitting the "title" property:

http://plnkr.co/edit/G6GFava2hQ0fqr0ycHMO?p=preview

I hope this helps, but if you have the time, please submit a feature request to our UserVoice portal as well:

http://kendoui-feedback.telerik.com/forums/555517-kendo-ui-for-angular-feedback/category/181426-dialog

It is closely monitored, and helps us prioritize, based on customer demand, when updating our roadmap. Thank you in advance.

Regards,
Dimiter Topalov
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
Ján
Top achievements
Rank 1
answered on 08 Aug 2017, 06:33 AM

This solution is fine for dialogs that we create using markup or if you want it globally. In our case, however, we use DialogService to spawn dialogs and in some cases we don't mind if it has close button, but in some cases we would like to remove it and currently this is not configurable

I submitted a feature request to UserVoice

0
Dimiter Topalov
Telerik team
answered on 09 Aug 2017, 10:25 AM
Hello Ján,

Thank you for submitting the feature request. Meanwhile you can use the following workaround to remove the close button conditionally, for example based on some class or other property of the click target that opens the Dialog via a service:

http://plnkr.co/edit/AxEm6hP4yS6ZAmYW3JkQ?p=preview

Direct DOM manipulation definitely is not the best way to accomplish the desired layout, but this is still a working option that you might consider until we provide a public API for enabling/disabling the close button.

Regards,
Dimiter Topalov
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
ModalView
Asked by
Ján
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Ján
Top achievements
Rank 1
Share this question
or