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

how am I able to show new data in a Kendow Window after data has already been loaded

2 Answers 59 Views
Window
This is a migrated thread and some comments may be shown as answers.
Kai
Top achievements
Rank 1
Kai asked on 29 Aug 2012, 02:12 PM
I'm having this problem with Kendo window, I can get the content to show up fine but when I use the call back function to retrieve and populate a div tag in the window, Kendo automatically applies a style of "display:none" to it. Is there a work around for this at all to use a custom message box with kendow window?

2 Answers, 1 is accepted

Sort by
0
Nohinn
Top achievements
Rank 1
answered on 29 Aug 2012, 02:20 PM
Do you have by any chance a jsfiddle sample that demonstrates your problem so I (and other people) can take a look?
If not, could you explain a bit more in detail your problem?
0
Kai
Top achievements
Rank 1
answered on 29 Aug 2012, 04:06 PM
I've been using only the fluent syntax but I'll try to demonstrate it. 
//Dialog
@Html.Kendo().Window().Name("wdwCreateNewUser").Title("Create User").Visible(false).Modal(true).Draggable(true).Content(@<text><div id="divCreateNewUser"></div>
</text>)
 
//Function that only gets the partial template and populate div tag w/ in window
$('#btnActionCreateNewUser').click(function () {
                    $.ajax({
                        url: "/Admin/Admin/GetCreateUserTemplate"
                    }).done(function (msg) {
                        $('#divCreateNewUser').replaceWith(msg);
                    });
                    var $wdwCreateUserWindow = $('#wdwCreateNewUser').data("kendoWindow");
                    $wdwCreateUserWindow.open();
                    $wdwCreateUserWindow.center();
                });
 
//Inside of partial I have this function
<script type="text/javascript">
        function AlertMessage(e) {
              $('#divCreateUserStatus').replace(e);
        }
</script>

So with this I should be able to receive my message from my action method and fill my div tag, I can actually but it doesn't display. In firebug I get a css attribute with the message that is 'display:none'
Tags
Window
Asked by
Kai
Top achievements
Rank 1
Answers by
Nohinn
Top achievements
Rank 1
Kai
Top achievements
Rank 1
Share this question
or