Telerik Forums
Kendo UI for jQuery Forum
1 answer
300 views
I try to display a treeview that  I build with ul and li from a ajax call:

<div class="demo-section">
        <ul id="555804139789770" class="treeview">
            <li data-expanded="true">Niveau 1
                <ul>
                    <li data-expanded="true" id="1234">Niveau 1.1
                        <ul>
                            <li data-expanded="true" id="123456">Niveau 1.1.1
                                <ul>
                                    <li data-expanded="true" id="1234567">Niveau 1.1.1.1
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                    <li data-expanded="true" id="12345">Niveau 1.2
                    </li>
                </ul>
            </li>
        </ul>
    </div>

There is my javascript  
   
$(".treeview").livequery(function() {
    
        $(this).kendoTreeView({
    
        });
    });

It works but it's slow

Do you have an other way to do that

Daniel
Telerik team
 answered on 03 Jul 2013
1 answer
81 views
In an MVC (Razor) environment:
Looking to have a hierarchy grid structure.... where the details grids get their data from a single stand alone kendo.dataSource object.
Looking to do this to work around detail grid having to Ajax back to the server for each detail record expand.
End goal is to have all detail records data passed at initial load of page and avoid numerous ajax hits.

Any suggestions?

Thanks.
Vladimir Iliev
Telerik team
 answered on 03 Jul 2013
3 answers
97 views
I've got the child browser wired up to the data-click event on a list view, but when I click on an item that has a div (with a background image) in the list item, it doesn't work. Clicking outside the image does work.

<style>
 .imageClass {
    background-image: url(some/image.jpg);
}
</style>

<ul data-role="list-view" data-click="onClick">
 <li><a href="#" data-linkUrl="someUrl"><div class="imageClass"></div>Clicking Text Works</a></lI>
</ul>
Steve
Telerik team
 answered on 03 Jul 2013
2 answers
149 views
EDIT:
I have been debugging and found the the content area height is being set to 1 pixel less than the total height.  
from kendo.all.js:

_setContentHeight: function() {
            var that = this,
                options = that.options,
                height = that.wrapper.innerHeight(),
                header = that.wrapper.children(".k-grid-header"),
                scrollbar = kendo.support.scrollbar();

            if (options.scrollable) {

                height -= header.outerHeight();

.....

the header.outerHeight() is returning 1 when it should be returning 41 or so for this particular grid.  not sure whats going on,  I will try and get a jsfiddle up and running.

Regards,
jimm
 


I have found some odd behavior when trying to create a grid.

please see the attached files in order:
First: notice the grid content height is shorter than the actual displayed content.  this grid is created by calling .kendoGrid() on an html table. 
CODE:
$('.ToKendoGrid').kendoGrid({ scrollable: false });
$('.ToKendoGridScroll').kendoGrid({ scrollable: true, height: 325 });

the html table is created via partial mvc views and when not kendo gridified it looks correct.

Second I have changed what is displayed on the current tab by changing the dropdown list to only show a specific set of information.

Third I have gone back to all information and the grid is now displaying correctly. 

Thoughts?

Regards,
jimm

One a side note I tried to submit this request through chrome and the file upload feature did not display correctly.

Jimm
Top achievements
Rank 1
 answered on 03 Jul 2013
1 answer
89 views
Started with the Icenium / Everlive / Kendo MVVM example. My add model for the class YFKey (name, description, status) is as follows:

    window.addYFKeyViewModel = (function () {
        var $newName, $newDescription, $newStatus;
        var validator;
        var init = function () {
            validator = $('#enterStatus').kendoValidator().data("kendoValidator");
            $newStatus = $("#newStatus");
            $newName = $('#newName');
            $newDescription = $('#newDescription');
        };
        var show = function () {
            $newStatus.val('');
            $newName.val('');
            $newDescription.val('');
            validator.hideMessages();
        };
        var saveYFKey = function () {
            alert("In saveYFKey");
            if (validator.validate()) {
                var items = YFKeysModel.YFKeys;
                var item = items.add();
                item.Name = $newName.val();
                item.Description = $newDescription.val();
                item.Status = 0;
                item.IsSystem = false;
                item.UserId = usersModel.currentUser.get('data').Id;
                items.one('sync', function () {
                    window.mobileApp.navigate('#:back');
                });
                items.sync();
                items.refresh();
            }
        };
        return {init: init, show: show, me: usersModel.currentUser, saveYFKey: saveYFKey};
    }());

This is accessed by an "Add" button from the listview of YFKeys (working fine) modeled exactly after the activities class within the example. Problem is this: AFTER I do an Add to the class YFKey, give new data, and hit the Save button, Everlive database IS properly updated, but the new item is in my listview with blank values, i.e., no name, and no description.

Not sure - probably an asynch problem? Not clear what the "one" function in your example does...

Any ideas?
Thanks.
CW
Petyo
Telerik team
 answered on 03 Jul 2013
2 answers
271 views
Hello,

I just wanted to start a discution about the vertical grid component.

In other telerik's products (WPF / Win Form / Silverlight), there's this Property Grid compoenent, which is a very handy when your need to display a simple record.

I wonder if that kid of componenet could be added to Kendo UI?

Here' my suggestion on kendo's user voice:
http://kendo.uservoice.com/forums/127393-kendo-ui-feedback/suggestions/2841182-vertical-grid-property-grid

Regards,

Simon
Jack
Top achievements
Rank 2
Iron
 answered on 03 Jul 2013
2 answers
197 views
Really useful widget. I have noticed that when I slide the drawer in, the hover color on the drawer-menu reflect where my finger was on the previous view that I slide away.  This is a bit confusing.
  
Per Lindsø
Top achievements
Rank 2
 answered on 03 Jul 2013
7 answers
96 views
Hi, since upgrading to version v2013.1.619 our application is no longer able to retrieve change information.

In our scenario we only bind to the top level model changed event i.e. viewData (see sample json below). This json can be nested to several layers. This Model is dynamic and can be nested to many levels.

We are only interested in knowing which members have changed.

Previous to this release, if the value property of  M53675 changed we would receive multiple change events at the top level model, one to signify that the rows property had changed and one for the value property of M53675.
Since this update we nolonger receive the event for the member change, just the rows property and there is no way of working out what caused the row change event.
The issues appears to be that when a change is bubbling up, the details of the change are lost when the passes through an ObservableArray.

We can modify our code to iterate through our model and attach a handler to the change event of each observable rows array but we would much prefer if there was an option to allow the modified property to bubble up.

Sample JSON

"viewData": {
  "name": "Contact (Insured)",
  "ID": "4123",
  "reference": null
  },
  "containers": {   
   "C12409": {
    "containerID": 12409,
    "containerType": 6,
    "containerName": "Container12409",
    "isVisible": true,
    "entityID": 419,
    "entityName": "Contact",    
    "rowCount": 1,
    "rows": [{
     "instanceInfo": {
      "entityID": 419,
      "instanceID": -1,
      "instanceStateMemberID": 2235
     },
     "columns": {
      "M53675": {
       "memberID": 53675,
       "name": "Contact Type",
       "value": 2,
       "description": "Organisation",
       "isDisabled": false,
       "isMandatory": true,
       "isValid": true,
       "isVisible": true,
       "isTargetMandatory": false,
       "isChangedThisUpdate": false
      },
      "M53674": {
       "memberID": 53674,
       "name": "Domicile Country",
       "value": null,
       "isDisabled": false,
       "isMandatory": true,
       "isValid": false,
       "isVisible": true,
       "isTargetMandatory": false,
       "isChangedThisUpdate": false
      },
      "M53673": {
       "memberID": 53673,
       "name": "Domicile State",
       "value": null,
       "isDisabled": true,
       "isMandatory": false,
       "isValid": true,
       "isVisible": true,
       "isTargetMandatory": false,
       "isChangedThisUpdate": false
      },
      "M113263": {
       "memberID": 113263,
       "name": "Language",
       "value": null,
       "isDisabled": false,
       "isMandatory": false,
       "isValid": true,
       "isVisible": true,
       "isTargetMandatory": false,
       "isChangedThisUpdate": false
      },
      "M72693": {
       "memberID": 72693,
       "name": "Contact Function",
       "value": 2,
       "code": "CO",
       "description": "Company",
       "isDisabled": false,
       "isMandatory": false,
       "isValid": true,
       "isVisible": true,
       "isTargetMandatory": false,
       "isChangedThisUpdate": false
      }
     },
     "isChangedThisUpdate": false
    }]
   },
Atanas Korchev
Telerik team
 answered on 03 Jul 2013
1 answer
74 views
Hi all,

I am evaluating Kendo's MVVM features and when trying out the datasource I can't stop it overwriting client data whenever I call .read()
I am trying to poll the server periodically (every 10 seconds for instance) and always get the latest snapshot of data on the server.  Unfortunately what happens at the moment is that if a user has pending edits then these edits are lost and replaced with the data from the server, whereas I would expect it to only update records that have not been marked as dirty.
I cannot use autoSync as I require a save button.

Is there something I am missing here or is this not possible?
Is there some other way of achieving this, otherwise it seems to be impossible to have polling updates from the sever whilst a user is editing the data on the client...

Many thanks,
Dave.
Alexander Valchev
Telerik team
 answered on 03 Jul 2013
1 answer
111 views
I've noticed this while building a KendoUI mobile page to be used in Phonegap.  

I've noticed that if you start your touch on an input field (not the label) and try to scroll the entire page, navbar  header  footer  etc, will scroll with the page instead of just the content of the page scrolling.

Is this normal behavior, if so any easy work around to the problem?

I'm using version 2013.1.514 (Q1 2013).
Seem to be most visible in iOS but also happens in Android 4.2 (blue effect on top/bottom).

Thanks,
Andrew

ps. first time post if I need to reformat or include anything else in this post please let me know. 
Petyo
Telerik team
 answered on 03 Jul 2013
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
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
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?