I have a dialog defined but the "mydialog-control" CSS class never gets added to the dialog when it's rendered. Why is that happening?
@(Html.Kendo().Dialog()
.Name(
"SalesTypeWarning"
)
.Title(
"Warning"
)
.Content(warningTextContent)
.Modal(
true
)
.Closable(
false
)
.Visible(
false
)
.Width(600)
.HtmlAttributes(
new
{ @
class
=
"mydialog-control"
})
.Actions(act =>
{
act.Add().Text(
"Continue"
).Primary(
true
).Action(
"allowSalesTypeChange"
);
act.Add().Text(
"Cancel Change"
).Action(
"cancelClicked"
);
})
.Deferred(
true
)
)
Hi Jon,
Thank you for reporting this behavior. I have investigated further and it appears that this is a bug. Thus, I have converted this item to a bug in the Public Feedback Portal and also logged it on GitHub:
As a temporary workaround you can use the Window widget where this functionality is supported. The below example would initialize a window widget with the myTestClass attribute added t the widget's instance:
@(Html.Kendo().Window()
.Name("myDialog")
.Title("My Dialog")
.Content(@<text>
<div>Window content here</div>
<hr />
@Html.Kendo().Button().Name("SubmitBtn").Content("Continue")
@Html.Kendo().Button().Name("CancelBtn").Content("Cancel")
</text>
)
.Modal(true)
.Visible(true)
.Width(600)
.HtmlAttributes(new { @class = "myTestClass" })
)
Also, as a small token of gratitude for helping us discover this issue, I have updated your Telerik Points accordingly.
Regards,
Aleksandar
Progress Telerik