Telerik Forums
Kendo UI for jQuery Forum
2 answers
155 views
Hi there,

I am struggling with datasource create transport. While normally the correct parameter to a rails server for creating a new item is as follow: 

Started POST "/shoes" for 127.0.0.1 at 2012-03-10 18:10:32 +0700
Processing by ShoesController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"QrQCjdrZTYpNCbCDeh8iCxSbUdFo7aTHg+GeGKTpNuA=", "shoe"=>{"name"=>"the correct format", "price"=>"", "url"=>"", "replacement_mileage"=>""}, "commit"=>"Create Shoe"}

But kendoui's data source create transport sends the following format:

Started POST "/shoes.json" for 127.0.0.1 at 2012-03-10 18:10:35 +0700
Processing by ShoesController#create as JSON
  Parameters: {"name"=>"shoename"}

Thank you in advance.

My script is as follow:
Item = kendo.data.Model.define({id: "id"});
dataSource =
new kendo.data.DataSource({
     transport: {
        read: {
url: (
"shoes.json")
        },
create: {
url: "shoes.json",
type: "POST"
}
     },
schema: {
model: Item
},

});
dataSource.read();
$(
"#items").html(kendo.render(template, dataSource.view()));
dataSource.add({
"name": "shoename"});
dataSource.sync();
Oscar
Top achievements
Rank 1
 answered on 20 Mar 2013
2 answers
57 views
Is the coming hierarchal datasource stuff mean that KendoUI will have associations?

Dean
Top achievements
Rank 1
 answered on 20 Mar 2013
2 answers
307 views
I'm trying to filter a data-source but I get the error described below. I did some research and found that it can normally be resolved by providing a schema.model that sets the offending property type to a number and this should tell kendoUI not to use toLowerCase() on it. Despite making this change, as you will see in the example, I still get the error. I'd appreciate some help.

Error message: Uncaught TypeError: Object 1 has no method 'toLowerCase'

Example: http://jsbin.com/ocehiq/1/edit - the error occurs when you change the selected category, which is supposed to filter the list of products
Dean
Top achievements
Rank 1
 answered on 19 Mar 2013
2 answers
64 views
Hello.
When I try to invoke the "onDrop" event on "kendoDropTarget" on ie 10 using Windows 8 Consumer Preview, I can't find all the properties relative to the positioning on the screen:
e.pageX
e.pageY
e.screenX,
e.screenY
e.clientX,
e.clientY

The same code works on Firefox 15.0.1

Thanks in advance,
Marco
Andy
Top achievements
Rank 1
 answered on 19 Mar 2013
0 answers
131 views
Hi,

After seeing the demo, I have implemented treeview checkboxes. After implementing all code logic, when I am trying to expand treeview on any parent node is not being expanded. Please  find below code 

GroupsTree.chtml :

<div id="treeview">
   
     @(Html.Kendo().TreeView()
                .Name("treeview")
                .Checkboxes(true)
                .Items(treeview =>
                {
                    treeview.Add().Text("Furniture").Id("1")
                        .Expanded(true)
                        .Items(furniture =>
                        {
                            furniture.Add().Text("Tables & Chairs").Id("2");
                            furniture.Add().Text("Sofas").Id("3");
                            furniture.Add().Text("Occasional Furniture").Id("4");
                        });

                    treeview.Add().Text("Decor").Id("5")
                        .Expanded(true)
                        .Items(furniture =>
                        {
                            furniture.Add().Text("Bed Linen").Id("6");
                            furniture.Add().Text("Curtains & Blinds").Id("7");
                            furniture.Add().Text("Carpets").Id("8");
                        });
                })
            )
</div>


In _Layout.Chtml :

 
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2012.3.1315/kendo.common.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/2012.3.1315/kendo.rtl.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2012.3.1315/kendo.dataviz.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2012.3.1315/kendo.default.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2012.3.1315/kendo.dataviz.default.min.css")" rel="stylesheet" type="text/css" />

<script src="@Url.Content("~/Scripts/kendo/2012.3.1315/jquery.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo/2012.3.1315/kendo.all.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/2012.3.1315/kendo.all.min.js")"></script>

Error : 
0x800a01b6 - Microsoft JScript runtime error: Object doesn't support property or method 'kendoTreeView'


Please let me know if you need any other information.
Srikanth
Top achievements
Rank 1
 asked on 19 Mar 2013
1 answer
1.3K+ views
Hi All,

I was wondering, what are you supposed to do with a dataItem ?

In the grid documentation, I saw code that looked like this:

var row = this.select(); // assuming this is single select
var dataItem = this.dataItem(row);

However, I'm not sure what I can call on dataItem.  How do I get the values of the selected row?
Dimiter Madjarov
Telerik team
 answered on 19 Mar 2013
1 answer
35 views
I have made a widget with a grid encapsulated in it. When i give the grid a maximum height via
.k-grid-content{
    max-height: 200px;
}
i have problems selecting the rows a the bottom of the grid, when i scroll down and click on a row the grid scroll to the top and doesn't select anything. The problem only occurs in IE, in chrome this works perfect.

I have created a sample
jsfiddle

best regards
Iliana Dyankova
Telerik team
 answered on 19 Mar 2013
3 answers
489 views
I can't seem to center the Kendo UI Menu on a page.  It is always left aligned.  I can center the text on it using text-align:center, but I want to center the entire menu on a page and then have the text be left aligned.  So far I have not had any luck.  It seems like it should be an easy thing to do.

Anyone?

I've attatched an image of the menu how it currently looks.  If you look at it, I am using my own menu (in green) on the top that is centered. I am then using the Kendo UI Menu on the bottom (in black).  The problem is that I can't seem to center the menu.  I can get the text in each of the menu items to be centered, but I need the whole menu to be centered on the page like the top green menu.

Anyone know how to do this?  Can it be done?  What do I need to do to center it.  Anyone have an example of the Kendo UI Menu being centered on a page?

Adrian
Top achievements
Rank 1
 answered on 19 Mar 2013
0 answers
116 views
Hi,
I am new to kendo ui, i am trying to use kendo grid in my mvc application, with the help of getting started section on kendo site, i am following the steps but getting error . I get the below error message "htmlfile: Unexpected call to method or property access" in jquery.min.js file, the below line in the file gets higllighted
(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)
Please help me in resolving the error, is it related to any error or anything
Sheo
Top achievements
Rank 1
 asked on 19 Mar 2013
3 answers
164 views
Open a modal window as in the code below.

Now drag the bottom of the underlying window up using the grab-bar, so that the bottom of the popup window is partially obscured.
var kendoWindow = $("<div id='msgwindow'/>").kendoWindow({
        iframe: true,
        title: "foo",
        resizable: true,
        modal: true,
        width: "700px",
        height: "666px",      
        content: { url: "foo.htm?startdate=" + foodate}
    }).data("kendoWindow");
 kendoWindow.open().center();


Now try to close the modal window by clicking on the [X] at top right corner. On my PC (IE9) the modal window won't close.


Alexander Valchev
Telerik team
 answered on 19 Mar 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?