Telerik Forums
UI for ASP.NET MVC Forum
3 answers
117 views
I see that kendo has added an i-frame qualifier to kendo window editors, this causes them to have no padding and makes the content appear flush with the window border.

This looks strange and should be fixed.

Adding your own padding causes a vertical scrollbar to appear.
Dimo
Telerik team
 answered on 23 Jan 2014
1 answer
331 views
Hi,

I am using a partial view to open as a pop-up editor window from my Index view.
I have custom edit & submit buttons in this window.
I use the $(".k-grid-update").trigger('click'); code to update and close the window after the custom code has completed but there is a substantial delay before closing the window and no activity or loading panel appears to show the form is being processed. It simply hangs for a couple of seconds and then completes the process by closing.
I've tried to force a custom 'Busy Indicator' once the form has been submitted but even this appears and disappears yet the window still remains open and closes after a delay.

My code for the custom button is below.
 
can you please let me know why there is such a long delay (2-3 seconds delay before closing)?
If this is normal then is there any way to show an indicator so the user knows the form is being processed and the window will be closed. So the users does not attempt to re-submit their form?

Regards,

Shuja

!function ($) {
    $.extend($.fn, {
        busyIndicator: function (c) {
            b = $(this);
            var d = b.find(".k-loading-mask");
            c ? d.length || (d = $("<div class='k-loading-mask'><span class='k-loading-text'>Loading...</span><div class='k-loading-image'/><div class='k-loading-color'/></div>").width(b.outerWidth()).height(b.outerHeight()).prependTo(b)) : d && d.remove()
        }
    });
}(jQuery);
 
 
function ApprovalSubmit() {
    var r = confirm("Are you sure you want to submit your approval selection?");
    if (r == false) {
        alert('Form NOT submitted');
        return;
    }
 
    ErrorMsgClear();
 
    var qiaComments = $('#QiaStatusComments').val();
    var mainDiv = $("#MainDiv").closest("div.k-window");
     
    mainDiv.busyIndicator(true); // show
 
    if (qiaComments == '') {
        mainDiv.busyIndicator(false); // hide
        ErrorMsg('Please complete the \'Approver Comments\' before submitting!');
        /*mainDiv.data("kendoWindow").close();
        win.kendoWindow({
            refresh: function () { this.center(); }
        }).data("kendoWindow")*/
        return;
    }
 
    var qiaId = $('#Id').val();
    var qiaControl = $('#Id');
    /*var dropdownlist = $("#cmbApprovalSelection");
 
    var dataItem = $('#cmbApprovalSelection option:selected').val();*/
    var dataItem = $("#cmbApprovalSelection");
 
        /*$('#cmbApprovalSelection').val();*/
    var approvalSelection = dataItem.val();
    /*alert(approvalSelection + '-' + dataItem.dataTextField + '-' + dataItem.dataValueField + '-' + dataItem.val());*/
 
    if (approvalSelection == null || approvalSelection == '') {
        mainDiv.busyIndicator(false); // hide
        ErrorMsg('Please select approval value from drop down list below!');
        /*mainDiv.data("kendoWindow").close();
        mainDiv.kendoWindow({
 
            visible: false
 
        }).data("kendoWindow").center().open();*/
        return;
    }
    else {
        $('#btnApproverSelection').hide();
 
        $.ajax({
            type: "POST",
            async: true,
            contentType: "application/json;charset=utf-8",
            url: "@Url.Action("ApproverSelection", "Home")",
            data: '{ "id":' + qiaId + ', "approverSelection":"' + approvalSelection + '", "comments":"' + qiaComments + '" }',
            dataType: "json",
            success: function (data) {
                if (data.Success == true) {
 
                    ErrorMsg2(data.Message);
                    $('#btnApproverSelection').hide();
                    /* close form by calling kendo grid update */
                    $(".k-grid-update").trigger('click');
                    /*qiaControl.closest(".k-window-content").data("kendoWindow").close();*/
                    $('#Grid1').data('kendoGrid').dataSource.read();
                    $('#Grid2').data('kendoGrid').dataSource.read();
                    mainDiv.busyIndicator(false); // hide
                }
                else {
                    ErrorMsg(data.Message);
                    mainDiv.busyIndicator(false); // hide
                }
 
            },
            error: function () {
                ErrorMsg('An error has occurred.\n' + data.Error + '\n' + data.Message);
                mainDiv.busyIndicator(false); // hide
                /*$('#btnApproverSelection').show();*/
 
            }
        });
        /*mainDiv.busyIndicator(false); // hide*/
 
    }
}
Dimo
Telerik team
 answered on 23 Jan 2014
1 answer
164 views

Hi,

I am using Kendo UI Tree view control, which is successfully showing the nodes and sub nodes. We have enabled the horizontal and vertical scroll bar in the tree view.  Once the tree is loaded, when the mouse moves over all the nodes and sub nodes with in the tree, the vertical scroll bar is automattically increasing.  it should suppose to move only when I try to move  up or down with selection of tree nodes.

Please help me to resolve the issue.

Thanks and Regards
Ramesh M N
Dimo
Telerik team
 answered on 22 Jan 2014
3 answers
140 views
Hello Kendo,

I had been running version 2013.3.1119.440 of the Kendo.Mvc.dll in my MVC 4 application. Grid was working fine. This morning I downloaded and installed the latest version of Kendo. I updated my project, and was referencing the new .dll .... when I ran the application all seemed to be working fine (drop downs, tools tips, etc), all except for the Kendo grid. My grid is populated via Ajax calls. The grid does not load the data, but all associated data calls seem to be working fine. (i.e. counts on data pulls, etc) Such counts display fine, drop down is pulling data just fine ... just no data is displayed in the Grid.

I had to uninstall version  2013.3 1316, and re-install the previous version 2013.3.1119 ... recreated the reference in my application, and then the Grid was working fine. All is back to normal.

Please confirm that the Grid works with an AJAX datasource ... and if there is something wrong with the latest download.

Thanks,

Carl


Peter
Top achievements
Rank 1
 answered on 22 Jan 2014
0 answers
62 views
If your are using the Q3 2013 service pack release, the additional data added with the read request Data function will not be sent to the server because of a bug in the transport. In order to avoid the problem, please use the latest internal build in which the problem is fixed.
Kendo UI
Top achievements
Rank 1
 asked on 22 Jan 2014
1 answer
299 views
The Kendo DatePicker has a bug it seems when you place it in a popup editor.  
This widget does not bind to a DateTime model property when you place it in a popup editor.
In the attached sample project I changed the culture in the web.config to 'auto' which on my workstation is set to 'en-AU.'
In this sample the 'PostedOn' property is a nullable DateTime though it makes no difference to this bug.
Adding ParseFormats strings makes no difference either.

This project is a modified sample that you have provided previously (see URL: http://www.kendoui.com/forums/kendo-ui-web/date-time-pickers/datetimepicker-format-doesn-t-work-with-initial-default-value.aspx)
As you can see from the attached screenshot kendo datepicker reports on erroneous date even though it is a valid date.
Outside the popup editor, this same datepicker works perfectly good.
Any workaround?

Regards,
Menashay
Daniel
Telerik team
 answered on 22 Jan 2014
1 answer
1.0K+ views
Hi ,

I am using a combobox with  a remote datasource. This field is bound to an integer property on my model.In the case of adding creating a new record combobox doesn't show any selection as the property is null.
@{
                Html.Kendo()
                    .ComboBoxFor(model => model.SendFromId)
                    .DataTextField("Text")
                    .DataValueField("Value")
                    .HtmlAttributes(new { style = "width:250px", data_value_primitive = "true" })
                    .DataSource(source =>
                    {
                        source.Read(read =>
                        {
                            read.Action("People", "Home");
                        });
                    })
                    .Events(e=>
                            {
                                e.Change("onComboChanged");
                            })
                    .Deferred()
                    .Render();
            }
Now  I need to set a default value when the property is null. I have tried to set using the  Value but it causes problem while edit.Though I change the selection and submit the form the Value parameter shows up again if I try to edit the record.
Did anyone have this kind of scenario before. Any help will be much appreciated.

Thanks,
Ramoji
Alexander Popov
Telerik team
 answered on 22 Jan 2014
9 answers
135 views

I have code that looks something like this, the data provided by the additionalData function is never sent or received, only the default kendo request parameters are (sort, filter, etc).

Please fix ASAP.

<script>
    function additionalData() {
        return {
            Word: "Bird",
            Number: 9001
        };
    }
</script>
 
@(Html.Kendo().Grid<KendoUIMvcApplication1.Models.TestModel>()
    .Name("Grid")
    .DataSource(dataSource =>
    {
        dataSource.Ajax().Read(read => read.Action("Read", "Home").Data("additionalData"));
    }))

Poh Joon
Top achievements
Rank 1
 answered on 22 Jan 2014
1 answer
79 views
I have inherited some code to fix what should have been a validation issue. I believe the best fix would be to change the field type in the grid to be a dropdown. At issue is changing the field to a drop down. As seen below, the last developer is creating a grid through JavaScript. This function is called from another JavaScript function which was called from an change event of another grid. Below is the code from the two involved scripts. I have attached a file containing all the other pertinent files to draw conclusions of the functionality that is in place. I want to replace the field "EXPLANATION_CODE" near below with a drop down sourced from a database table but still bounded as it is currently. I would think this should be rather simple but is beyond my current understanding. Also, I am not authorized to change how the grid is currently coded. So I cannot remove it from the function and place it in the view. I can only change the type of the field. Any and all help would be greatly appreciated. If after reviewing the functionality, you see a better way to perform all the required functionality, please forward thoughts. I may be able to refactor later to remove this hideous monstrosity.

/* Following function is in a separate script file and is called from another function */
function SendDocTranInfoToServer(pDocId, pDocSeq) {
    if ($("#kGridExplanations").data("kendoGrid") == null) {
        $("#kGridExplanations").kendoGrid({
            columns: [
                { field: "EXPLANATION_CODE", title: "Code", width: "200px" },
                { command: "destroy" }
            ],
            editable: {
                createAt: "top"
            },
            toolbar: ["create"]
        });

    } else {
        var saveExplanations = "";
        var expGrid = $("#kGridExplanations").data("kendoGrid");
        var expGridDs = $("#kGridExplanations").data("kendoGrid").dataSource;
        var allData = expGridDs.data();

        for (var i = 0; i < allData.length; i++) {
            saveExplanations = saveExplanations + allData[i].EXPLANATION_CODE + "|";
        }
        $.ajax({
            url: "/Inquiry/SetExplanationCodeAndText",
            dataType: "json",
            type: "POST",
            data: { docId: $("#hdPrevDocId").val(), docCount: $("#hdPrevDocCount").val(), expCode: saveExplanations, filingText: $("#tbTextFiling").val() },
            success: function (response) {
            }
        });
        expGrid.dataSource.data([]);
        $("#tbDocCountFiling").val("");
        $("#tbTextFiling").val("");
    }
    $("#hdPrevDocId").val(pDocId);
    $("#hdPrevDocCount").val(pDocSeq);

    var explanationCodes = [];
    $.ajax({
        url: "/Inquiry/GetExplanationCodeByCount",
        dataType: "json",
        type: "POST",
        data: { docId: pDocId, docCount: pDocSeq },
        success: function (response) {
            if (response.hasError) {
            }
            if (!response.hasError) {
                for (var i3 = 0; i3 < response.length; i3++) {
                    var explanationCode = {
                        EXPLANATION_CODE: response[i3].EXPLANATION_CODE,
DOC_COUNT: response[i3].DOC_COUNT,
                    };
                    explanationCodes.push(explanationCode);
                 }  
                 if (explanationCodes.length == 0) {
                     if ($("#kGridExplanations").data("kendoGrid") != null) {
                         $("#kGridExplanations").data("kendoGrid").dataSource.data([]);
                     }
                 } else {
                     var dsExpCode = new kendo.data.DataSource({
                         schema: {
                             model: {
                                 fields: {
                                     EXPLANATION_CODE: { type: "string" },
                                 }
                             },
                             parse: function (response) {
                                 return explanationCodes;
                             }
                        }
                    });

                    if ($("#kGridExplanations").data("kendoGrid") != null) {
                        var grid1 = $("#kGridExplanations").data("kendoGrid");
                        grid1.setDataSource(dsExpCode);
                    }
                }
            }
        }
    });
}
/* Following function from view holding a separate grid and used for the change event */
function kGrdCDocTransChange(arg) {
      var ar = arg;
     var selectedRows = this.select();
     var selectedDataItems = [];
     for (var i1 = 0; i1 < selectedRows.length; i1++) {
         var dataItem = this.dataItem(selectedRows[i1]);
         selectedDataItems.push(dataItem);
     }
     SendDocTranInfoToServer(selectedDataItems[0].DOC_ID, selectedDataItems[0].DOC_COUNT);
 }
Daniel
Telerik team
 answered on 21 Jan 2014
1 answer
64 views
There needs to be a configurable hovertext field for each pager button so that it can be WCAG compliant.
Kiril Nikolov
Telerik team
 answered on 21 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?