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

Styling titlebar of kendo-dialog dynamically

1 Answer 1984 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
EGrop
Top achievements
Rank 1
EGrop asked on 24 Jul 2018, 09:05 AM

Hi, I have the following question about styling the titlebar of the kendo-dialog (stackoverflow link):

https://stackoverflow.com/questions/51306813/how-to-css-style-kendoui-dialog-titlebar-in-2-different-ways-when-opening-from-t

Thank you very much for your time.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimiter Madjarov
Telerik team
answered on 24 Jul 2018, 11:19 AM
Hello,

In order to create the Dialog component dynamically, we use the createComponent method of ViewContainerRef.

https://angular.io/api/core/ViewContainerRef

This method appends the newly created component after the specified container and not inside it. This is the reason why the first approach you have tried didn't work. However I would suggest to wrap the Dialog container in a div with the according CSS class and style the title-bar accordingly.
E.g.
<div class='myClass'>
  <div kendoDialogContainer></div>
</div>

.myClass kendo-dialog-titlebar {
 ...
}

I hope this information helps. Have a great day!

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