Telerik Forums
Kendo UI for jQuery Forum
1 answer
371 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
287 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
213 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
459 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
650 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
519 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
66 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
150 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
2 answers
172 views
Hi,

I'm using version "2014.2.716"

In this version calling tabStrip.select() will return an empty array if there is no tab selected. I see this behavior is different in later versions, where the TabStrip widget instance is returned instead.

So, my question is, what is the official way to determine if a tab is currently selected or not?

By the way, it's changes like this that have made our adoption of newer releases of the framework slow/painful. Looking through KendoUI Release History I don't see any breaking changes listed for TabStrip - yet, here is one.
Josh
Top achievements
Rank 1
 answered on 24 Mar 2015
1 answer
179 views
Hello,

I'm needing to disable collapsible behavior after some user actions, then, when the user finishes editing a form, the collapsible should be set to true again allowing the user collapse the current pane and open other one.

Is there any way to implement this?

PD: I tried setting the splitter.options.pane[INDEX].collapsible = false, it didn't work for me.


Thanks
Dimo
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
Map
Drag and Drop
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?