Telerik Forums
Kendo UI for jQuery Forum
2 answers
55 views
Do you plan to add resource view to the scheduler  where resources will be rendered on some axis?
Anton
Top achievements
Rank 1
 answered on 31 Jul 2013
1 answer
256 views
First of all...this is my first Kendo app...I've been using Telerik controls for a couple of years, but we are upgrading and this is my first attempt here.

I have a simple app that I have extracted from my real page, that I cannot seem to get the treeview to show up on.  The data appears to be getting there, but I'm missing something on my definition, I just don't know what.

Here is the HTML:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CDefault.cs" Inherits="CDefault" %>

<%@ Register Assembly="ABL.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d35011ca6b35a98a" Namespace="ABL.Controls" TagPrefix="cc1" %>

<!DOCTYPE html>
<html>
<head>

<title>View Document Library</title>

<!-- Kendo styles from the CDN! -->
<link href="https://da7xgjtj801h2.cloudfront.net/2013.1.319/styles/kendo.blueopal.min.css" rel="stylesheet" />
<link href="https://da7xgjtj801h2.cloudfront.net/2013.1.319/styles/kendo.common.min.css" rel="stylesheet" />

</head>
<body id="pageBody">
<form id="form1" runat="server">
<div>
<div id="treeviewLeft" >
</div> 
<br />
<table>
<tr>
<td></td>
<td style="padding-left:120px">
<button class="k-button" id="btnUploadDocument">Upload Document</button>
</td>
<td style="padding-left:820px">
<button class="k-button" id="btnUseSelected">Use Selected</button>
&nbsp;&nbsp;
<button class="k-button" id="btnClose">Close</button>
</td>
<td></td>
</tr>
</table>
</div>
<!-- JavaScript at the bottom for fast page loading -->

<!-- Fix for IE < 8 that don't have built in JSON support -->
<script src="javascript/json2.js" type="text/javascript"></script>

<!-- Grab Google CDN's jQuery, with a protocol relative URL -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

<!-- IE HTML5 enabling script: -->
<script src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>

<!--kendo web-->
<script src="https://da7xgjtj801h2.cloudfront.net/2013.1.319/js/kendo.web.min.js"></script>

<!-- libraries -->
<script src="libs/rotate/jQueryRotateCompressed.2.2.js" type="text/javascript"></script>
<script src="libs/jQueryFileDownload/jquery.fileDownload.js" type="text/javascript"></script>

<!-- local javascript -->
<script src="javascript/authentication.js" type="text/javascript"></script>
<script src="javascript/adcUtilities.js" type="text/javascript"></script>
<script src="javascript/CdefaultViewController.js" type="text/javascript"></script>

<%--<% End If%>--%>
</form>
</body>
</html>

AND here is the Controller file:
// Copyright 2013 Acuity Brands Lighting, Inc. All Rights Reserved.

// This is the view controller for the default.aspx web page.

$(function () {

$.ajax({
//Call for data goes here
url: 'Data/data.aspx',
dataType: 'json',
async: true,
success: function (returnedTreeNodeData)
{
$('#loadingIndicator').remove();
console.log("Get TreeviewNodeData CALL SUCCESS");
console.log("********** treeView data: JSON structure data, from the data.aspx Call **********");
console.log(JSON.stringify(returnedTreeNodeData, null, 1));
alert("Get TreeviewNodeData Success!");
treeView.dataSource.data(returnedTreeNodeData);
}
})

var treeView = $("#treeviewLeft").kendoTreeView({
expanded: true,
autoBind: true,
dataTextField: "Text",                                  //I've tried several things here...so far no joy.
items: "ChildNodes",
datasource: []
}).data("kendoTreeView");
});

AND here is where I get my data, which as I say appears to be getting to the Controller just fine.  BTW...this is a treeview Light version of what I'll eventually be sending.


#region DataClass

[Serializable]
public class TreeviewNodeData
{
private TreeNode tNode;
public TreeNode libraryNde
{
get
{
tNode = new TreeNode("Rep Library");
return tNode;
}
set
{ }
}

public List<TreeNode> topNde { get; set; }
}

#endregion


public partial class Data_data : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string hold_brand = string.Empty;
string output = "default";
JavaScriptSerializer jss = new JavaScriptSerializer();

TreeviewNodeData tvOut = new TreeviewNodeData();
List<TreeNode> tList = new List<TreeNode>();

TreeNode ABLParentNode = new TreeNode("ABL");
tList.Add(ABLParentNode);
TreeNode NonABLParentNode = new TreeNode("non-ABL");
tList.Add(NonABLParentNode);
tvOut.topNde= tList;

 output = jss.Serialize(tvOut);

//Output the response
Response.Clear();
Response.ContentType = "application/json";
Response.Write(output);
Response.End();
}
}


Anyone see what I'm missing or have any suggestions?  The page comes up with the buttons on the bottom, but nothing else is on the page.

Thanks.
Dimiter Madjarov
Telerik team
 answered on 31 Jul 2013
3 answers
138 views
Hi,

Is there a way I can achieve a logarithmic scale on a barchart? I am trying to solve an issue that I currently have with a pie chart where there are large values and small values in the same chart (example attached).

If there's no way to achieve a logarithmic scale, do you have an alternative solution for what I am encountering?

Thanks.
Iliana Dyankova
Telerik team
 answered on 31 Jul 2013
1 answer
85 views
I'm trying to add an EditorTemplate to my grid and it's not selecting the correct value on edit.

Any suggestions?
AspenSquare
Top achievements
Rank 1
 answered on 31 Jul 2013
1 answer
82 views
Hi,

I would like to change the position and modify the display of input field as text, which class should I apply the custom CSS to?
I follow the following demo to add the input fields:

http://demos.kendoui.com/mobile/forms/index.html#/

Moreover, the link to the documentation page is broken.

Thanks.

BR,
Ralph
Iliana Dyankova
Telerik team
 answered on 31 Jul 2013
1 answer
84 views
hi

  I am using calendar control Type="date".How can i give validation to check whether the given date is in correct format or not.


<div style="margin-top:2px; width:98%;">
      <div class="black-lbl-text-mid"  style="width:55%; padding-left:0px; float:left; text-align:left;">Start Date </div>
    </div>
<div style="float:left; width:98%;" >
      <input id="txtLabourStartDate" type="date"  name="txtLabourStartDate" class="textbox-3" style="width:50%;  float:left; text-align:left;"/>
  </div>
Atanas Korchev
Telerik team
 answered on 31 Jul 2013
1 answer
1.3K+ views
I'm binding to genders collection DataSource that is exposed through ViewModel
 
var genderDataSource = new kendo.data.DataSource({
       transport: {
           tbl: azureService.client.getTable('XconfigGender'),
           read: function (options) {
               console.log('read');
               //{ FirstNameEn: options.data.filter.filters[0].value }
               this.tbl.read({ SearchString: "*" }).done(
                   function (d) {
                       options.success(d);
                   });
           },
           update: function (options) {
               console.log('update');
               //var mod = kendo.stringify(options.data.models[0]);
               this.tbl.update(options.data.models[0]).done(function (d) {
                   options.success(d);
               }, function (err) {
                   options.error(err);
               });
           },
           create: function (options) {
               this.tbl.insert(options.data.models[0]).done(function (d) {
                   options.success(d);
               }, function (err) {
                   options.error(err);
               });
           },
       },
       schema: {
           model: { id: "id" }
       }
   });
Html:

<select data-role="dropdownlist" data-text-field="GenderEn" data-value-field="id" data-bind="source:genders, value: selectedItem.GenderID"></select>
But when a try to save selectedItem.GenderID its not bound to the value of dropdown list but to the object that is selected (instead selectedItem.GenderID to be example 2 it is the object with id and a description  so is it example {id:2, GenderEn:"Male"} ).

So my question is how do i bound to the data-value-field and not the object.

Sorry for my bad Englisht
Atanas Korchev
Telerik team
 answered on 31 Jul 2013
2 answers
135 views
Hi all,

I am looking for some best practice ideas before diving in. We have an existing ASP.Net MVC app which we will be providing a mobile front end for. We'll be using the Kendo mobile controls in an ASP.Net MVC project. Here are the questions I have so far:

1. Is it best to create a new ASP.Net MVC project for the mobile view, or so you keep them in the same project and then in the _Layout page check for mobile?
2. Is it best to put the app init in the _Layout page? (I'm talking about this script: var app = new kendo.mobile.Application();)

Thanks in advance!
Trent
Top achievements
Rank 1
 answered on 31 Jul 2013
2 answers
199 views
Hi,

I am trying to workout how to use cascade feature with this hierarchical data set.

Object Type  of Brand with fields of  Id, Name
Object Type of Product with fields of Id, Name, BrandId

As you can see the Parent and Child objects have the same Primary Key name, and the parent key is the object name with Id  suffix,

From the examples I have seen and various other posts etc, I think the primary key name is is the object name with Id suffix.

I did set up with the various Id names etc and my odata call uses the Id in the filter on the Products.

/odata/products?$inlinecount=allpages&top=100&$filter=Id eq 1 

where it should have been

/odata/products?$inlinecount=allpages&top=100&$filter=BrandId eq 1 

So my question is can you specify the parent field name.  If not I think this should be an additional feature for this widget.

Regards

Richard...

 
Richard
Top achievements
Rank 1
 answered on 31 Jul 2013
5 answers
115 views
Hi there,

The dataBound event used to fire before Q2 and not any more. I am still with free trial version . Does that matter?

Also dataSource calling remote odata service returns nothing with Q2. Is there any API changes to the dataSource?

Thanks
Jamie
Petyo
Telerik team
 answered on 31 Jul 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?