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

Editor Not Working in Window

5 Answers 90 Views
Editor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jigar
Top achievements
Rank 1
Jigar asked on 18 Sep 2010, 10:09 PM
Hi There,

I am trying to bind editor in window, editor is being rendered but I am not able to type text in it.
Model:
<UIHint("Editor")>
Property comments As String

View:
Html.Telerik().Window().Title("CommentWindow")
                       .Name("CommentWindow")
                       .Modal(True)
                           .Effects(Sub(fx)
                                           fx.Zoom()
                                           fx.OpenDuration(200)
                                           fx.CloseDuration(200)  
                                         End Sub)
                                .Resizable(
Sub(resizable)
                                             resizable.Enabled(
False)
                                    resizable.MinHeight(250)
                                    resizable.MinWidth(250)
                                    resizable.MaxHeight(300)
                                    resizable.MaxWidth(300)
                                     End Sub)
                                .Content(
"")
                                .Buttons(
Function(b) b.Close()).Visible(False).Render()
JavaScript:
function OnConfirmButtonClick(id) {
        myid = id;
        $('#CommentWindow')data('tWindow').center();
        $('#CommentWindow').data('tWindow').open()
    }

windows is being rendered successfully. It shows editor but it's not editable.

Please suggest a way to fix it.

Thanks,

Jigar.

5 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 20 Sep 2010, 10:15 AM
Hello Jigar,

In the sample code that you provided, you don't seem to insert the editor in the window. How exactly do you load it?

Kind regards,
Alex Gyoshev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jigar
Top achievements
Rank 1
answered on 20 Sep 2010, 09:02 PM
Hi Alex,

Thanks a lot for your reply.
I am sorry that was my mistake.

I add it like,
Dim htmlStringModel = Html.EditorFor(Of MyModel)(Function(model) model.MyModel).ToHtmlString()
Html.Telerik().Window().Title(
"CommentWindow")
                       .Name("CommentWindow")
                       .Modal(True)
                           .Effects(Sub(fx)
                                           fx.Zoom()
                                           fx.OpenDuration(200)
                                           fx.CloseDuration(200)  
                                         End Sub)
                                .Resizable(
Sub(resizable)
                                             resizable.Enabled(
False)
                                    resizable.MinHeight(250)
                                    resizable.MinWidth(250)
                                    resizable.MaxHeight(300)
                                    resizable.MaxWidth(300)
                                     End Sub)
                                .Content(
htmlStringModel)
                                .Buttons(
Function(b) b.Close()).Visible(False).Render()

And in above code MyModel contains only Comment field as I mentioned in my above post.

Thanks.

Jigar.
0
Jigar
Top achievements
Rank 1
answered on 21 Sep 2010, 01:58 PM
Hi Alex,

Can you please tell me; Is it a bug or Am I doing something wrong?

thanks.

Jigar.
0
Accepted
Alex Gyoshev
Telerik team
answered on 22 Sep 2010, 04:14 PM
Hello Jigar,

This is an issue when the Window client-side object gets initialized after the Editor. Thank you for pointing it out - we are currently looking for a resolution. Until we find one, you can use the following as a work-around:

Dim window = Html.Telerik().Window().Title("CommentWindow")
                       .Name("CommentWindow")
                       .Modal(True)
                           .Effects(Sub(fx)
                                           fx.Zoom()
                                           fx.OpenDuration(200)
                                           fx.CloseDuration(200)  
                                         End Sub)
                                .Resizable(
Sub(resizable)
                                             resizable.Enabled(
False)
                                    resizable.MinHeight(250)
                                    resizable.MinWidth(250)
                                    resizable.MaxHeight(300)
                                    resizable.MaxWidth(300)
                                     End Sub)
                                .Buttons(
Function(b) b.Close()).Visible(False)

Dim htmlStringModel = Html.EditorFor(Of MyModel)(Function(model) model.MyModel).ToHtmlString()


window.Content(htmlStringModel)

That is, let the server-side initialization of the window be before the one for the editor. I am attaching the sample solution we used for testing.

Your Telerik points have been updated for the report.

Kind regards,
Alex Gyoshev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jigar
Top achievements
Rank 1
answered on 22 Sep 2010, 04:17 PM
Hi Alex,

Thank you very much, for your inputs.

Thanks & Regards,

Jigar
Tags
Editor
Asked by
Jigar
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Jigar
Top achievements
Rank 1
Share this question
or