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

Kendo Window Content model values not persisted

3 Answers 232 Views
Window
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 25 Jun 2015, 03:30 PM

I have the following window code with 2 date picker controls which read and write to 2 date properties on my model

The window can read the properties fine, but can never set them, even though if I re-open the window control it knows what the new values are.

Is there some kind of validation or commit function that needs to called before closing the window object?

 @(Html.Kendo().Window()
    .Name("ReportRefreshOptionsDialog")
    .Title("Schedule Report Options")    
    .Content(@<text>
         <div class ="left" width:100px>From:</div>
         @(Html.Kendo().DatePicker()
            .Name("Model.ScheduleReport.FromDate")
            .Value(Model.ScheduleReport.FromDate)
            .HtmlAttributes(new { style = "width:150px" })
         )

         <div class ="left" width:100px>To:</div>
         @(Html.Kendo().DatePicker()
            .Name("Model.ScheduleReport.ToDate")
            .Value(Model.ScheduleReport.ToDate)
            .HtmlAttributes(new { style = "width:150px" })
         )        
      <p></p>
      <div align="right"><button id="btnReportOptionsOk">Ok</button></div>
     </text>)
    .Modal(true)
    .Width(250)
    .Visible(false)
    .Actions(actions => actions.Close())
)

 

 

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 29 Jun 2015, 11:11 AM
Hi Karl,

I don't see where you are submitting the new values to the server? This is not the Window's job and you need to take care of it, e.g. by using a form inside the WIndow or an Ajax request. With regard to forms, please read:

http://docs.telerik.com/kendo-ui/web/window/overview#using-kendo-ui-window-with-a-form

Regards,
Dimo
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Raj
Top achievements
Rank 1
answered on 02 Oct 2017, 01:58 PM

Hi 

I am using Angular objects with in html to populate fields. kendo window is unable to grab those values from angular objects on a page.

it is working fine if i display directly on page but if i display in Kendo window it is not.

please find the code.

   @(Html.Kendo().Window()
    .Name("OutfallInfo")
    .Title("Outfall List")
    .Visible(false)
    .Content(@<text>
        <div class="container" align=center>
            <div id="dialog-message" ng-controller="echoController">
                <div ng-repeat="facility in result.Results.PermFeatures">

                    <ul>
                        <li>{{facility.PermFeatureNmbr}}-{{facility.PermFeatureTypeDesc}}</li>
                    </ul>
                </div>
            </div>
        </div>
    </text>)
        )

//angular Code

  var myapp = angular.module('myapp', []);
    myapp.controller('echoController', function ($scope, $http) {
        $scope.spinner = false;
        $http.get('https://ofmpub.epa.gov/echo/eff_rest_services.get_effluent_chart?output=json&p_id=@Model.NPDES').then(function (response) {
            $scope.result = response.data;
            if (result = !null) {
                $scope.spinner = true;
            }
        });
    });

But im getting results as following -> Please find attached Image for kendo window.

Raj.

0
Dimo
Telerik team
answered on 04 Oct 2017, 07:45 AM
Hello Raj,

The observed behavior is caused by the fact that the Window is moved in the DOM. The following documentation section provides information on possible options:

http://docs.telerik.com/kendo-ui/AngularJS/introduction#widgets-placed-in-window

- use the appendTo option to append the window to another HTML element which is part of the Angular application and scope, or
- initialize the AngularJS application on the body.

On a side note, please consider opening new forum threads for issues that are unrelated to the original discussion. This will facilitate focused and streamlined communication. Thank you for understanding.

Regards,
Dimo
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Window
Asked by
Karl
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Raj
Top achievements
Rank 1
Share this question
or