kob490
kob490

Reputation: 3317

Setting the parent elements of Kendo UI content

I'm using some KendoUI web widgets such as DropDownList, which create 'div' elements that are being added to the bottom of the Body. is there a way to configure those to be added as children of one specific div, instead of being direct children of 'body'?

Upvotes: 0

Views: 272

Answers (1)

Lars Höppner
Lars Höppner

Reputation: 18402

Some widgets have an appendTo configuration option, e.g. kendoWindow, but most don't. kendo.ui.Popup (which is used by widgets like kendoDropDownList and kendoComboBox) appears to be using that configuration option, so it might be relatively easy to make some changes to achieve what you're after.

In response to your follow-up question: there is no document for kendo.ui.Popup because it's not intended to be used independently - it's just a reusable component for the framework itself.

If you're concerned about having to clean up the DOM elements created by a widget, you can achieve that by using the widget's destroy method.

Upvotes: 1

Related Questions