Telerik Forums
Kendo UI for jQuery Forum
3 answers
141 views
Hi, 

We have a grid that is part of a form, which is used to create a one-to-many relationship. However, we cannot set the grid to InLine editing without having to specify an URL for create/update/delete. 

We would like not to specify those URLs and simply read from the grid's datasource before submitting the form.

Sending calls to /dev/null is not an option, since that seems to reset the ViewModel's state (we lose info on isNew, isDirty, etc).

Is there a way we could use this mode without auto-saving?

Thank you,
Jni

PS : I'm sorry - I didn't realize there was a "grid" forum separate from the asp.net mvc grid. Can you please move it?
Vladimir Iliev
Telerik team
 answered on 07 Oct 2013
1 answer
97 views
I can't get columnMenu to display when I have a method defined for each columns filterable attribute.  I get a Microsoft Error.

My grid configuration looks like :
$("#gridCityCodes").css("top", "46px").kendoGrid({
 dataSource: this.gridDataSource,
 sortable: true,
 editable: true,
 selectable: "multiple",
 navigatable: true,
 filterable: true,
 resizable: true,
 columnMenu: true,
change: this.gridChanged,
 toolbar: [{ name: "save", text: userMsgs.Save }, { name: "cancel", text: userMsgs.Cancel}],
 columns: [{ field: "CityAlpha", width: "100px", title: userMsgs.CityCode, filterable: this.fixGridFilterPopups },
 { field: "CityNumeric", width: "150px", title: userMsgs.IataCityCode, filterable: this.fixGridFilterPopups },
 { field: "Description", width: "300px", title: userMsgs.Description, filterable: this.fixGridFilterPopups },
 { field: "NextFlightEnabled", width: "200px", title: userMsgs.NextFlightEnabled, filterable: this.fixGridFilterPopups}],
 dataBound: function () {
 window.selectedModuleViewModel.reHighlightSelectedRows();
 window.selectedModuleViewModel.pullColumnsForFiltering();
 }
 });
    fixGridFilterPopups: {
        ui: function (element) {
/* logic commented out to do nothing right now. */
        }
    }
I get an error in kendo.web.js with an error
var ObservableObject = Observable.extend({
    init: function(value) {
        var that = this,
            member,
            field,
            parent = function() {
                return that;
            };
 
        Observable.fn.init.call(this);
 
        for (field in value) {
            member = value[field];
 
            if (field.charAt(0) != "_") {
                member = that.wrap(member, field, parent);  // <-------- error occurs here
            }
 
            that[field] = member;
        }
 
        that.uid = kendo.guid();
    },

The error I receive is a Microsoft JScript runtime error:  Object doesn't support property or method 'wrap'.  Any ideas on how to get around this?  FWIW, if I turn off the columnMenu option the filter dialog comes up just fine.
Alexander Popov
Telerik team
 answered on 07 Oct 2013
1 answer
74 views
Hi, 
I'm building a grid bound to a remote source.
I Have Read and Create methods now.
When I create a new record everythings works fine, for the first "insert"
If I create another record the grid sends to the server both my new records.

I suppose that is because the key value of the model ( a simple ID -> rowId from db) is always 0 and so the datasource thinks that is a newly inserted record.
Is there a way to update my datasource with the rowId (that I manage to return back to client after being inserted on db)?
Or should I simply reload the grid (not so performing though)? 

I'm using inline & batch edit! 

Thanks
Fabio
Alexander Valchev
Telerik team
 answered on 07 Oct 2013
1 answer
583 views
Hi, 

I would like to suggest an improvement concerning events on the DropDownList. 

We wasted a lot of time to figure out that the "select" event is not fired when the value is changed programmatically. This seriously violates the "least surprise" principle. Later we found out about the "cascade" event. But here are a few suggestions : 

* Improve documentation : http://docs.kendoui.com/api/web/dropdownlist#events-cascade. Seems like a copy/paste mistake. Also explain how it differs from select. 
* Improve consistency : in the select event, you use "e.item" to get the selected item while you need to use "this.element" in cascade.
* I'd suggest combining the 2, or if there is a feature about the "cascade" event that I don't see, I think it would be nice for the select event to be fired when changed programmatically. If people need to know wether or not it was from user interaction, a simple "e.fromUser" or something like this would do the trick.

In any case, I just thought that "cascade" was counter-intuitive to use to catch a selection, especially since there is already a "select" event. 

Thank you, 
Jni
Georgi Krustev
Telerik team
 answered on 07 Oct 2013
1 answer
224 views
Hi, I have issue with folder uploading.
My scenario is:
- user drag and drop folder on Kendo uploader;
- in method upload for Kendo uploader I check if file have't extension and it's file size is 0;
- if yes I cancel uploading using such code:
                                                                                 e.preventDefault();
                                                                                 return false;
- if no continue file uploading


But for some folders I have situation when it's size is not 0.

How I can correctly prevent folder uploading using Kendo Uploader.

I check this in Chrome browser version Version 29.0.1547.76 m.

My code is:
upload: function (e) {
                    $.each(e.files, function (index, el)
                    {

                        //If we try to upload folder prevent this
                        if (el.extension === "" && (typeof el.size === "undefined" || el.size === 0)) {
                            e.preventDefault();
                            return false;
                        }

                        
                    });
                }
Dimiter Madjarov
Telerik team
 answered on 07 Oct 2013
1 answer
83 views
Hi

I want to have cascading drop down lists that are specified in different editor files and was wondering whether this was possible? So far I have not been able to get it working.

 --- ItemTypeEditor.cshtml
@using Kendo.Mvc.UI;
@model DataModels.Picking.PickingAssignmentItemType
 
@(Html.Kendo().DropDownList()
        .Name("Type")
        .DataTextField("Description")
        .DataValueField("TypeCode")
        .DataSource(source => source
            .Read("GetAssignmentTypes", "Picking")
            .ServerFiltering(true)           
        )
)

 -- ParentItemEditor.cshtml
@using Kendo.Mvc.UI;
@model DataModels.Picking.PickingAssignmentItemViewModel
 
@(Html.Kendo().DropDownList()
        .Name("ParentItem")
        .DataTextField("ItemId")
        .DataValueField("ItemId")       
        .DataSource(source =>
        {
            source.Read(read =>
            {
                read.Action("GetAssignmentKits", "Picking")
                    .Data("filterTypes");
            })
            .ServerFiltering(true);
        })
        .CascadeFrom("Type")
)  
 
<script>
    function filterTypes() {
        return {
            Type: $("#Type").val()
        };
    }
</script>
Can anyone see anything wrong with the above? Or determine whether a cascade is even possible across two different files?
Vladimir Iliev
Telerik team
 answered on 07 Oct 2013
1 answer
67 views
Hi 
is it possible to change the version style for only a single element, like in my case a switch, from ios6 style to ios7 style?
I want to have the application initiated with ios6 style and use the switch with ios7 style.
I hope i was clear.
Thanks Dario
Kamen Bundev
Telerik team
 answered on 07 Oct 2013
1 answer
192 views
We have a scheduler similar to your scheduler/resources demo (http://demos.kendoui.com/web/scheduler/resources.html).
If we configure our scheduler to use an eventTemplate, the color-coded-square would not show in the AgendaView... We need this color-coded-square to show on the Agenda view, is there a way to do this?
Rosen
Telerik team
 answered on 07 Oct 2013
1 answer
135 views
I have a real obscure bug with Kendo UI mobile, if you navigate to this page on an iPhone
 
http://www.bobclubs.com/app/Person/1064?Region=uk#/ click the "send SMS/Text" link, all works fine.

Now save the page as a "add to home screen" and reopen, the SMS link now doesn't work.

I have tested this on a windows phone and Andriod phone and it all works ok even if I pin the page to the start/home pages.



Kiril Nikolov
Telerik team
 answered on 07 Oct 2013
2 answers
232 views
Hi,

I use the TreeView with ASP.NET MVC wrapper and I need to optimize the loading time with a multilevel data fetching. We need to display a product and service catalog (UNSPSC, 4 level) with more than 20.000 nodes. The remote binding and on-demand data fetching works like a charm, but we need to implement a search function. Our idea is that the whole catalog can be accessed through the treeview, but when the user enters a keyword, the treeview expands to the matching nodes and highlightes them. This means that the treeview might need to expand more than 100 nodes, which results more than 100 http requests. The configuration code right now:
@Html.Label("Search")
@Html.TextBox("catalogSearch")
<input id="searchCatalogButton" type="button" value="Go" />
@(Html.Kendo().TreeView().Name("catalogTree")
.DataSource(dataSource => dataSource.Read(read => read.Action("GetCatalogItems", "Catalog"))))
Our 'SearchCatalogItems' controller action returns the JSON serialized hierarchical catalog data which has to be displayed, but the HierarchicalDataSource can't process this when remote binding is used. An example result of the 'SearchCatalogItems' action result: (Notice that the Mid #2 node has children but it's not expanded.)
[
   {
      "id": 1,
      "text": "Top #1",
      "matching": false,
      "expanded": true,
      "hasChildren": true,
      "items": [
         {
            "id": 2,
            "text": "Mid #1",
            "matching": false,
            "expanded": true,
            "hasChildren": true,
            "items": [
               {
                  "id": 3,
                  "text": "Bottom #1",
                  "matching": true,
                  "expanded": false,
                  "hasChildren": false
               }
            ]
         },
         {
            "id": 4,
            "text": "Mid #2",
            "matching": false,
            "expanded": false,
            "hasChildren": true
         }
      ]
   }
]
I could initialize a new HierarchicalDataSource from the search results without remote binding, and that could build the tree from this, but I still need the remote binding after the search, because we just downloaded the minimum part of the tree to show and highlight the results and the user might want to explore the catalog from there. I hope my problem is clear.

Is there any way to solve this with the support of the api? Can you give me an idea which is the best way to solve this problem?

Thanks,
    Loránd Biró
Loránd
Top achievements
Rank 1
 answered on 05 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?