Telerik Forums
Kendo UI for jQuery Forum
14 answers
718 views
Is it possible to return a model which contains some lists and some integers, and process each as a series, using ASP.NET MVC? I'm wanting to display a scatter chart, line charts, etc.
Alex Gyoshev
Telerik team
 answered on 25 Mar 2015
1 answer
247 views
Hi i am new to kendo UI framework and trying my hands on tree view part.I am using Ajax for loading data but its not coming in Treeview format.i guess something wrong with the schema part the mapping is not correct ,i don't know how to map it exactly.Can anyone help me in this.right now i am able to load kendo tree using the local data.how can i convert this into remote data binding...???? here is my code: 

public class EloquaTreeJSONBean {

private String id;
private String text;
private String parent;
private String type;
}.....////////// follow with getters and setters  

jsp code:

var dataSource = new kendo.data.HierarchicalDataSource(
{
data : [
{
categoryName : "TransperfecttranslationPartner",imageUrl: "../resources/js/jstree/home.png",
subCategories : [
{
subCategoryName : "Emails",imageUrl: "../resources/js/jstree/email_16.png",
subCategories : [

{
subCategoryName : "Emails1.1",imageUrl: "../resources/js/jstree/email_16.png",
},
{
subCategoryName : "Emails1.2",imageUrl: "../resources/js/jstree/email_16.png",
},
{
subCategoryName : "Emails1.3",imageUrl: "../resources/js/jstree/email_16.png",
}

]
},
{
subCategoryName : "Landingpage",imageUrl: "../resources/js/jstree/eloquaLandingPageIcon.png",
subCategories : [

{
subCategoryName : "landingpage1.1" ,imageUrl: "../resources/js/jstree/eloquaLandingPageIcon.png",
},
{
subCategoryName : "landingpage1.2",imageUrl: "../resources/js/jstree/eloquaLandingPageIcon.png",
},
{
subCategoryName : "landingpage1.3",imageUrl: "../resources/js/jstree/eloquaLandingPageIcon.png",
}

]
},
{
subCategoryName : "Dynamiccontent",imageUrl: "../resources/js/jstree/dynamicContentIcon.png",
subCategories : [

{
subCategoryName : "Dynamiccontent.1",imageUrl: "../resources/js/jstree/dynamicContentIcon.png",
},
{
subCategoryName : "Dynamiccontent.2",imageUrl: "../resources/js/jstree/dynamicContentIcon.png",
},
{
subCategoryName : "Dynamiccontent.3",imageUrl: "../resources/js/jstree/dynamicContentIcon.png",
}

]
}, ]
},

],
schema : {
model : {
children : "subCategories"
}
}
});

$("#gltreegrid").kendoTreeView(
{
dataSource : dataSource,
dataTextField : [ "categoryName",
"subCategoryName" ],

checkboxes: {
               checkChildren: true
           },

           

}); 
Alex Gyoshev
Telerik team
 answered on 25 Mar 2015
1 answer
377 views
In the code below I have two AngularJS KendoDatePickers. The first one works perfectly, if you click on the button you open the calendar. The second one is within a directive that has the transclude attribute set to true. If you click on the second button, you get an error.

You can see the working example in this plunk.

HTML:

<input kendo-date-picker="picker" />
<button ng-click="openPicker()">Open Date Picker</button>

<my-window>
     <input kendo-date-picker="picker2" />
    <button ng-click="openPicker2()">Open Date Picker 2</button>
</my-window>Javascriptvar app = angular.module("app", [ "kendo.directives" ]);


Javascript:

    app.controller('MyCtrl', function($scope) {

    $scope.openPicker = function () { 
         $scope.picker.open();
     };


     $scope.openPicker2 = function () {
         $scope.picker2.open();
     };

});


app.directive('myWindow', function() {

    return {
        transclude: true,
        scope: {
            someVar: '='
        },
        restrict: 'EA',
        template: function(element, attrs) {
            var html = '<div ng-transclude></div>';
            return html;
        }
    };
});
Atanas Korchev
Telerik team
 answered on 25 Mar 2015
2 answers
294 views
I am so frustrated with this. I need to put an if statement into a ClientTemplate on an MVC grid. I have this :

columns.Bound(p => p.ValidERAGenerated)
    .ClientTemplate(
        "# if (ValidERAGenerated == true) { #" +
        "<button class=\"btn btn-primary btn-sm\">Get ERA <span class=\"glyphicon glyphicon-file\"></span></button>"
        + "# } #"
    )

If I just have the button by itself in the ClientTemplate, it works fine. However if I add the if statement like above, then the grid will no longer load any data. In fact, nothing in $(document).ready will run when that if statement is present. I have tried changing the if statement to simply say "if (true)" and "if (1==1)" thinking that maybe the problem is something with my ValidERAGenerated field, but that doesn't help. I cannot get any conditional statement to work like the documentation says it should. $(document).ready simply will not run at all when that conditional is there and the grid will not load any data. It appears to just break all javascript.
Dimiter Madjarov
Telerik team
 answered on 25 Mar 2015
1 answer
223 views
hi,
i'm trying to filter a date column in kendo treelist.
whenever i try to filter the date column using "is equal to" the result will always return empty

here is the example in telerik dojo
http://dojo.telerik.com/iROBU

try to filter the date using "is equal to", for example "is equal to March 23 , 2015" the result will always return empty even though the record do exist.
however if i chose "is after March 23 , 2015", the "March 23, 2015" record is displayed.
am i missing something?
is there a way to fix this?

thanks
Petur Subev
Telerik team
 answered on 25 Mar 2015
1 answer
472 views
In the code below, if you select a tree node and click the button, you'll see that the node text changes however the node icon stays the same (see method $scope.changeNode) . How to change the icon?

You can see a working example in this link.


HTML:
      <div kendo-tree-view="tree" k-data-source="treeData" k-options="treeOptions"></div>
      <button ng-click="changeNode()">Change selected node</button>

CSS:
          .k-treeview .k-sprite {
            background-image: url("http://demos.telerik.com/kendo-ui/content/web/treeview/coloricons-sprite.png");
          }
          .rootfolder { background-position: 0 0; }
          .folder { background-position: 0 -16px; }
          .pdf { background-position: 0 -32px; }
          .html { background-position: 0 -48px; }
          .image { background-position: 0 -64px; }
         


Javascript:

    angular.module("KendoDemos", [ "kendo.directives" ]);
    
    function MyCtrl($scope) {
      
      $scope.changeNode = function() {
            var node = $scope.tree.select();
            $scope.tree.dataItem(node).set('text', "New Text");
            $scope.tree.dataItem(node).set('icon', "html");
      };
          
          
      $scope.treeData = new kendo.data.HierarchicalDataSource({
                data: [
                    { text: "Folder 1", icon: "folder", items: [
                        { text: "Doc 1", icon: "pdf" },
                        { text: "Doc 2", icon: "pdf" },
                        { text: "Doc 3", icon: "pdf" }
                    ] },
                    { text: "Folder 2", icon: "folder", items: [
                        { text: "Doc 3", icon: "pdf" },
                        { text: "Doc 4", icon: "pdf" },
                        { text: "Doc 5", icon: "pdf" }
                    ] }
                ]
            });
 

      $scope.treeOptions = {
              dataSpriteCssClassField: "icon"
      };

    }
Daniel
Telerik team
 answered on 25 Mar 2015
4 answers
661 views
I'm using version 2014.1.416

I have two cascading dropdowns with server filtering.  They are working fine, however, I would like the filter value for the child dropdown to use a different property of the parent object then what is set for the dataValueField in the parent dropdown.  So, I tried using cascadeFromField but all that did was change filter[filters][0][field].  It did not change filter[filters][0][value].  To workaround that, I had to set the transport.read.data in the child datasource to the parent property that I actually need.  Is this a bug?
Kiandy
Top achievements
Rank 1
 answered on 24 Mar 2015
2 answers
524 views
I have just downloaded the trial version and it only has the minified versions of the Kendo UI source code. This is adequate for trial, but I would like to know if a commercial version has a non-minified version of the library.

This is an extremely important question for us. Previously we were using the Sencha library that had quite a few glitches. The only way around the glitches was to override the library's methods and fix the bugs without waiting for the next release of the library. If full source code of Kendo UI is not provided in the commercial version, then there is no point evaluating as we will be completely stuck if a bug is found.
Vladimir
Top achievements
Rank 1
 answered on 24 Mar 2015
3 answers
67 views
Hi,

after upgrade from kendo 2014.3.1411 to 2015.1.318 i got this error in dropdowns: "unable to get property 'setDataSource' of undefined or null reference." so I reverted back to 2014.3.1411 and it works as expected.

I'm using kendo as directive with angularjs 1.2.27

Thanks,
Enrico
Kiril Nikolov
Telerik team
 answered on 24 Mar 2015
3 answers
155 views
Hi,

I have an MVC project with Angular at the front end, and I am trying to edit a raw inline. Please can you advice me what I am doing wrong here?

Here is the code.

Index. cshtml

<div ng-controller="EmpCtrl">
    <div kendo-grid k-data-source="emps"
         k-selectable="'row'"
         k-filterable="true"
         k-sortable="true"
         k-editable="'inline'"
         k-pageable='{ "pageSize": 5, "refresh": true, "pageSizes": true }'
         k-columns='[
    { "field": "FirstName", "title": "First Name"},
    { "field": "LastName", "title": "Last Name"},
    { "field": "Country", "title": "Country"},
  { "field": "City", "title": "City"},
    { "field": "Title", "title": "Title" },
  { command: ["edit","destroy"], title: " ", width: "200px" }
  ]'>
    </div>
</div>

App.js
var app = angular.module("KendoDemo", ["kendo.directives"]);
app.controller("EmpCtrl", ['$scope',  function ($scope) {
   
    $scope.emps = new kendo.data.DataSource({
        transport: {
            read: {
                url: "Home/GetEmployees",
                dataType: "json"
            },
            update: {
                url: "Home/EditEmployee",
                dataType: "json"
            },
            parameterMap: function (options, operation) {
                if (operation !== "read" && options.models) {
                    return { models: kendo.stringify(options.models) };
                }
            }
        }, pageSize: 5,
        schema: {
            model: {
                id: "Id",
                fields: {
                    Id: { editable: false, nullable: false },
                    FirstName: { validation: { required: true } },
                    LastName: { validation: { required: true } },
                    Country: { validation: { required: true } },
                    City: { validation: { required: true } },
                    Title: { validation: { required: true } }
                }
            }
        }
       
    });
}]);

Home Controller

public ActionResult GetEmployees()
      {
          var emp = _db.People.ToList();
          return Json(emp, JsonRequestBehavior.AllowGet);
      }

[HttpPost]
        public ActionResult EditEmployee(Person emp)
        {
            var p = _db.People.FirstOrDefault(d => d.Id == emp.Id);
            p.FirstName = emp.FirstName;
            p.LastName = emp.LastName;
            p.Title = emp.Title;
            p.City = emp.City;
            p.Country = emp.Country;
            _db.SaveChanges();
            return Json(emp, JsonRequestBehavior.AllowGet);
        }


Many thanks,
Anita


  





Boyan Dimitrov
Telerik team
 answered on 24 Mar 2015
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Drag and Drop
Map
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?