Telerik Forums
Kendo UI for jQuery Forum
7 answers
424 views
When using the toJSON function on ObservableObject, there is a distinct issue with the way it deserializes. 

The way toJSON outputs will yield to this kind of behavior in HTTP Posts.
Name                 | Value
items[0][Name]       | Name 1
items[0][Id]         | a
items[1][Name]       | Name 2
items[1][Id]         | b
This is incorrect, though. It should be coming in like this ...
items[0].Name       | Name 1
items[0].Id         | a
items[1].Name       | Name 2
items[1].Id         | b
The way Kendo's toJSON function works will essentially make it completely impossible to send data over the wire, because the values of properties will get stripped away. This is pretty easy to fix, as even the most basic behavior in Knockout does not do this. 

This is a pretty egregious problem, as it makes it very difficult and confusing to rely on the tools, because now I know that anything that Kendo's internals use that implements toJSON is completely unsuitable for any kind of method calls.

Is there any chance this can get fixed soon?
Atanas Korchev
Telerik team
 answered on 24 Sep 2013
1 answer
148 views
Is the following supported and if so, how?

If have an in memory object array:

[{
    id: 1,
    name: "item 1",
    parentid: null
},
{
   id: 2,
    name: "item 2",
    parentid: null
},
{
   id: 3,
    name: "subitem for 1",
    parentid: 1
}]

I want the treeview to initially load and display the root items (with parentid null). When a user expands a root node, I want it to display all nodes with that node's id as parentid . I want to be able to build the hierarchy with no limit using this way.
Dimiter Madjarov
Telerik team
 answered on 24 Sep 2013
4 answers
426 views
Hi

I have a Kendo grid, where one of the columns is a text field, which represents an IP address. I have used a client template to create a hyperlink

c.Bound(o => o.AddrIP).Width(120)
    .ClientTemplate("<a href='http://#= AddrIP #' target='_blank'>#= AddrIP #</a> ")


This seems to work in principle.

But when a row has no IP address specified, I get a "null" as a string with a hyperlink to 'null'
Strangely, if I use the ClientTemplate format specified by the old MVC extenssions

c.Bound(o => o.AddrIP).Width(120)
    .ClientTemplate("<a href='http://#= AddrIP #' target='_blank'><#= AddrIP #></a> ")


I get a set of "<>" around the text (which is probably expected !!), but the "null" hyperlink problem disappears.

Any help to get the proper format would be appreciated

Regards

Achilles

Achilles
Top achievements
Rank 1
 answered on 24 Sep 2013
4 answers
1.8K+ views
I would like to have my command button display different text based on the values in the row.  I have tried

command: [{
    name: "return",
    click: myHandler,
    template: '#= getCommandText(col1, col2) #'
}]
 
function getCommandText(c1, c2) {
      //return text based on values in this row
}
 
function myHandler(e) {
    //perform actions based on value in row
}

But the command's template call doesn't seem to be aware of values in the row like field columns do. 

I suppose another alternative would be to have multiple commands in a column, and hide certain ones based on the values in the row, but I am not sure how to do this either.

Thanks,
~S
Henrik
Top achievements
Rank 1
 answered on 24 Sep 2013
1 answer
95 views
Hi,

Does anybody know how can I add a confirmation pop-up on re-size event, and cancel changes when the user click cancel button?.
The sample scenario is like this:
  • when the user resize an event/schedule, a pop-up window will display with a message saying.. "Re-sizing this event will update the time range." with a two button which is "Ok" and "Cancel".
  • So, when the user click "Ok" re-size will do his function as default which update the event/schedule
  • else, if the user click the "Cancel", re-sizing of event/schedule will be cancelled.. means cancel any changes to the schedule.
I know how to pop-up the window.. but I can't figure it out how to cancel changes when user click the "Cancel button".
Thanks.

Regards,
Jesson
Rosen
Telerik team
 answered on 24 Sep 2013
1 answer
72 views
This is probably more a request than a bug.

I'm using the <optgroup> tag to group the options in my select. The MultiSelect widget converts them to "undefined" items. Is the optgroup tag supposed to be supported? If not, could it be in the future?

Thanks
Georgi Krustev
Telerik team
 answered on 24 Sep 2013
1 answer
278 views
Hi,

I need to make some of the items in the combobox to act like headers, therefore I need them to be not clickable,  is this possible?

I'm planning in using templates for both the headers (no clickable) and the children elements (the clickable options)

Thank,
Ignacio
Georgi Krustev
Telerik team
 answered on 24 Sep 2013
1 answer
286 views
hello
in my complete mobile web app i got the same problem wenn redirecting to a new site with click on a button

example:
iam on site: www.host.org/home/index
and i want to: www.host.org/mail/inbox

on click the button redirects to correct site but the url is now www.host.org/home/index#/mail/inbox

its no big thing, main features are still working, but i ran into some update and refresh issues. for example: after a redirect and creating of a this kind of a monster url badges on buttons are no longer displayed. even refresh don let them appear. only tiping the correct url fixes it.
i also have problems with login and out becouse of this kind of url


example for a button :
<a data-role="button" href="/projekte/index"> <img src="~/Content/images/icons/48x48/projekte48.png" /> Projekte </a>

or my "login button"
<a data-click="login" id="modalview-login-button" type="button" data-role="button">Login</a>
<script>
//...

$.ajax({
        type: "POST",
        url: webMethod,
        data: parameters,
        contentType: "application/json; chaset=utf-8",
        dataType: "json",
        success: function (data) { if (data.Success) { app.navigate("/home/index"); closeModalView(); } }
    });

//...
</script>
Petyo
Telerik team
 answered on 24 Sep 2013
1 answer
39 views
hi all, I'm developing an app with PhoneGap and KendoUI; I'm brand new to both of these frameworks so forgive my potential ignorance.

I have a single html file with multiple data-role="view" views, within the phonegap JS I am watching for state changes, on "deviceready" i'd like to change from my default "Loading" view to my login view.

My question is: is there an elegant, KendoUI method to trigger this view change? If not, do I simply .hide() the one and .show() the other?

Thanks
Daniel
Telerik team
 answered on 24 Sep 2013
1 answer
59 views
I am using a kendo grid (2012.2.803.340). I am binding data
on read action. It always fires correctly. But on Ajax post, it does not fire.
Other than Firefox browser, it works fine.
Nikolay Rusev
Telerik team
 answered on 24 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?