Telerik Forums
Kendo UI for jQuery Forum
6 answers
334 views
I have a grid with OrderID and OrderDate. The sorting is done on the server. The initial load is sorted on the OrderID.

The grid gets the data in JSON format.
How do I specify that the sort field and direction are null then by default show the sort icon on OrderID and Default direction is ASC?

Thank you
Vin
Dave
Top achievements
Rank 1
 answered on 31 May 2012
2 answers
91 views
Hey guys, I dont' know if you're aware of this or not, but the demo source code for your mobile UI needs updating.

You guys are missing the link to the mobile style sheets - 

<link href="http://cdn.kendostatic.com/2012.1.515/styles/kendo.mobile.all.min.css" rel="stylesheet">

It took me about 45 minutes to realize my page was not working because you didn't have this in the demo source code. I didn't realize I needed this until I looked at the source code for the mobile pages here: http://demos.kendoui.com/mobile/m/index.html

Just giving you a heads up.
Jeremy
Top achievements
Rank 1
 answered on 31 May 2012
1 answer
151 views
If I have the following treeview template:-

<script id="treeview-template" type="text/kendo-ui-template">
                                # var id = item.id; #
                                # var name = item.text; #                                                 
                                # var parentId = item.parentId; # 
                               
                                 #= item.parentid #
                                 # if (item.parentid == null) { #
                                     test
                                 # } #

                               
                                <span categoryId="#= id #" class="#= parentId #">#= name #</span>
                                <input type="hidden" name="#= name #" value="#= id #" />
                        </script>

Any way for me to disable the nodes where the parentId is null?

I tried doing this without success:-
  # if (item.parentid == null) { #
  <span categoryId="#= id #" class="k-denied">#= name #</span>
# } #
 
Thanks
Gregor

Iliana Dyankova
Telerik team
 answered on 31 May 2012
0 answers
132 views
I have used custom tags like aui:column etc in template and it works like a charm. However tags like 

<liferay-ui:ratings-score score="5"></liferay-ui:ratings-score> does not work. It prints the output of this custom tag right on the top of the page.

Actually it prints the output of the above mentioned custom tag in the template as well as on the left top corner of the page
Any help ?

Muhammed Shakir
Top achievements
Rank 2
 asked on 31 May 2012
1 answer
460 views
I would like to sort my datasource by date.  However, whenever I change the field type from "string" to "date" I get "null" in place of the dates.  The format of the dates is:  dd-mm-yy hh:mm

 Can anyone see what I am doing wrong?

var ticketDataSource = new kendo.data.DataSource({
      transport: {
          read: "/support/data",
          dataType: "json",
          create: {
              url:  function() {
                  if (support_create_type == 'new'){
                      var url = "/support/newticketpost/";
                  } else if (support_create_type == 'reply'){
                    var url = "/support/reply/" + support_id + "/";
                  }                          
                   
                  return url;
              },
              type: "POST",
              dataType: "json"                   
          },
          update: {
              url:  function() {
                  if (support_update_type == 'markasread'){
                    var url = "/support/markasread/" + support_id + "/";
                  } else if (support_update_type == 'close'){
                     var url = "/support/close/" + support_id + "/" + support_ticket_closed; 
                  }
                  return url;
              },
              type: "POST",
              dataType: "json"
          },               
      },
     error: function(e) {
        alert(e.responseText);
     },
     sort: { field: "DateCreated", dir: "asc" },
   
      schema: {
        model: {
            id: "ThreadID",
            fields: {
                DateCreated:  { type: "date" },
                Subject:  { type: "string" },
                Closed:  { type: "string" }                    
               }
           }
       }
   });


Many thanks,
Lee
Top achievements
Rank 1
 answered on 31 May 2012
1 answer
5.3K+ views
I need to get the row data (firstname, lastname) from the current row from a custom command.  I need to create a vcard from the custom command and the first name, last name will be used in the back end to dynamically generate the vcard but I have been trying to extract the current row data and have so far been unsuccessful.  Here's my code....
$(function() {
    var grid = $("#grid").kendoGrid({
        dataSource : {
            pageSize:10,
            sort : {
                field : "firstname",
                dir : "asc"
            },
            transport : {
                read : "data/getemployees.php"
            },
            schema : {
                data : "data",
                total: "data.length"
            },
        },
        pageable: true,
        columns : [{
            field : "firstname",
            title : "First Name"
        }, {
            field : "lastname",
            title : "Last Name"
        }, {
            field : "cellphone",
            title : "Cell Phone"
        }, {
            field : "deskphone",
            title : "Desk Phone"
        }, {
            field : "emailaddress",
            title : "Email Address"
        },{
            command:{text:"vCard", className:"vCardButton"}, title:"vCard", width:"110px"
        }],
        sortable:true,
    });
       $("#grid").delegate(".vCardButton", "click", function(e) {
                       
                        var grid = $("#grid").data("kendoGrid");
                       
                        var myVar = grid.dataItem(grid.tbody.find(">tr"));
                       
                    });
});

any suggestions?
Alexander Valchev
Telerik team
 answered on 31 May 2012
0 answers
110 views
Hi Kendo Team,

I've found a couple bugs with the Kendo Grid when navigatable is set to true. First, you cannot multiselect rows using the keyboard. I would expect shift+arrows or ctl+arrows would select multiple rows. However, this is not the case. Second, if you select a row in the Kendo Grid and then you navigate to that grid with the keyboard and move the arrows keys, the selection of the currently selected row does not change but instead other rows are selected IN ADDITION to the one selected with the mouse.

 Is there a known work around for these? If not, are these things you guys are aware of and planning on fixing?
Jason
Top achievements
Rank 1
 asked on 31 May 2012
14 answers
837 views
I have been unable to connect the Kendo Grid to my ASP.NET JSON Web Service as no data is appearing. Can you tell me how to fix the Kendo Grid so it consumes the web service.  Thanks

    $(document).ready(function() {
                    $("#grid").kendoGrid({
         dataSource: {
             type: "jsonp",
          serverPaging: true,
          serverSorting: true,
          pageSize: 13,
          transport: {
           read: "../../emrwebservices/service.asmx/getSampleSQLDataKendo"}
           },
             schema: {
                 data: 'items',
                 total : function(data) {return data.totalCount;
              }
         },
      height: 250,
      scrollable: true,
      sortable: true,
      pageable: true,
      columns: [
                            { field: "userID", title: "User ID" },
                            { field: "fullName", title: "Name" },
                            { field: "userName", title: "User Name" },
                            { field: "eMail" },
                            { field: "isActive"}
                        ]
                    });
                });

Web Service data is below.  Also viewable at http://www.speechtodocs.com/emrwebservices/service.asmx

{"totalCount":80,"items":[{"userID":"227","fullName":"Dr. Hank Aaron","userName":"HankAaron","eMail":"melissa@dmmt.com","isActive":"True"},{"userID":"197","fullName":"Dr. Jeffrey Aronoff","userName":"4690","eMail":"melissa@dmmt.com","isActive":"True"},{"userID":"189","fullName":"Dr. Sunil Asnani","userName":"4749","eMail":"melissa@dmmt.com","isActive":"True"},{"userID":"165","fullName":"Dr. Kalman etc..................
Engifaar
Top achievements
Rank 1
 answered on 31 May 2012
2 answers
60 views
I just registered on kendo and downloaded the trial of kendoui.

On same page, the kendoui test studio download was also suggested.

When i tried that, it took me to login again.

But the account login of kendoui did not work there.

Would it not be nice that kendoui account login is same as telerik  and vice versa ?
Prashant
Top achievements
Rank 1
 answered on 31 May 2012
0 answers
128 views
Hi Team,

I am using kendo UI grid component, I fetched data and in grid component but now i need to refresh grid data automatically after given interval of time. Is there any method or technique available in Kendo Framework for grid.?
Could you please help me for this?


Thanks,
Ankush.
Ankush
Top achievements
Rank 1
 asked on 31 May 2012
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?