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

Editor in Window

4 Answers 282 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 21 Sep 2012, 05:14 PM
When placing an Editor in a Window the Editor control does not render correctly (tried this in IE 10, 9, 8 and FireFox)

We are using the latest verion of the MVC Wrappers: 2012.2.913.340

Below is an example from our code (Partial View)
@using (Ajax.BeginForm("AddComment", "Incident", new AjaxOptions { HttpMethod = "Post", OnSuccess = "onSuccess('AddWindow')" }))
{
    @Html.ValidationSummary(true)
 
    <div class="editor-field">
        @(Html.Kendo().EditorFor(model => model.Comment)
                .Name("Comment")
                .Tools(tool => tool
                    .Clear()
                    .Bold()
                    .Italic()
                    .Underline()
                    .InsertOrderedList()
                    .InsertUnorderedList()
                    .JustifyLeft()
                    .JustifyCenter()
                    .JustifyRight()
                    .JustifyFull()
                    .Indent()
                    .Outdent()
                    .CreateLink()
                                   .Unlink()))
        @Html.ValidationMessageFor(model => model.Comment)
    </div>
    @Html.HiddenFor(model => model.IncidentId)
    <p>
        <input type="submit" value="Add Comment" class="k-button" />
    </p>
}

On our Detail page:
@(Html.Kendo().Window()
           .Name("AddWindow")
           .Title("Add Comment")
           .Content(@<div>@Html.Partial("IncidentCommentAddPartial", Model.AddComment)</div>)
           .Draggable(true)
           .Modal(true)
           .Visible(false)
           .Width(625)
          )

Our onclick function for the window:
$('#addComment').click(function (e) {
            e.preventDefault();
            window.center().open();
        });

I have attached an image of how the partial view is being rendered in the Window

4 Answers, 1 is accepted

Sort by
0
Greg
Top achievements
Rank 1
answered on 15 Oct 2012, 03:00 AM
Folks
I am having the same Issue as Nick
Any workarounds/solutions , anything??

This nesting technique worked in Telerik MVC but does not work in KendoUI MVC

Need help on this?

Regards

GregJF
Oct 15,2012
0
Lilis
Top achievements
Rank 1
answered on 23 Oct 2012, 06:04 AM
I also have the same problem with Nick.

It'd be great if there's solution for this.

Thanks.
0
Greg
Top achievements
Rank 1
answered on 23 Nov 2012, 05:09 AM
Nick
I think I got it to work
Have a look at this post
http://www.kendoui.com/forums/mvc/editor/editor-in-a-window-a-solution.aspx

regards

Greg
0
Dimo
Telerik team
answered on 23 Nov 2012, 06:59 AM
Hello,

There are two separate problems, which cause the unexpected Editor look:

1. The widget cannot adjust its layout when initialized hidden
2. The Editor is initialized twice when initialized before the Window, because the Editor is moved in the DOM and its intiialization script is executed twice.

Problem 2 is fixed in the latest internal build, while problem 1 will be resolved in the next internal build of Kendo UI.

Greetings,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Editor
Asked by
Nick
Top achievements
Rank 1
Answers by
Greg
Top achievements
Rank 1
Lilis
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or