Telerik Forums
Kendo UI for jQuery Forum
4 answers
819 views

Hi
Trying to make a grid containing a button column, where the button displays a locked or unlocked button icon depending on the data source for the row. The button should also toggle the locked property.
Using a “normal” column template it is simple to make the visual part of the task.

{ field: "Locked",
title: "", width: 20, template: '<div
class="btn btn-default"> <i class="#= Locked? "fa
fa-lock" : "fa fa-unlock" # "></i></div>',
filterable: false},

The above code works but does not handle click event.
Using a command field template, the field variables are not available?

{ command:
{ click: toggleLocked,
template: '<div class="btn btn-default"> <i class="#=Last? "fa fa-lock" : "fa fa-unlock" #"></i></div>'
},
width: 20
},

The above code does not work.

 

Any suggestions?

Kake
Top achievements
Rank 1
 answered on 05 Aug 2015
1 answer
155 views

I have a couple of questions that have come up in planning how we might use the charts:

1. Can a line or stock chart calculate "moving averages" (e.g. average of last 30 days) and chart it, or does that data have to be calculated explicitly and provided in the datasource?

2. Can "extreme" data points (those wildly out of line with respect to others by some defined factor, say 10x) be eliminated, or again, must this be done by the datasource?

Thanks!

Iliana Dyankova
Telerik team
 answered on 05 Aug 2015
1 answer
230 views

I am using Kendo UI 2005 Q2 release (v2015.2.624) with Angular JS. I have the following drop event handler to prevent an in valid drop based on the destination node type.

         $scope.onDropTreeNode = function (e)
        {
            var destinationNode = $("#ruleTreeView").data("kendoTreeView").dataItem(e.destinationNode);
            
            if(destinationNode.nodeType != 3)
            {
                console.debug("Can't drop in node type: " + destinationNode.nodeType);
                e.setValid(false);
                console.debug(e);
            }
        }

The event handler is invoked as expected, the IF statement executed, and both console.debug statements print out the debugging message/object content. I can see that the "valid" data field is set to false in the event object:

Object {originalEvent: MouseEvent, sourceNode: li#ruleTreeView_tv_active.k-item.ng-scope, destinationNode: li.k-item.ng-scope, valid: false, dropTarget: span.k-in.k-state-hover…}

HOWEVER, the Tree View control still allows the drop even though the valid == false. I was expecting the drop to be reverted after e.setValid(false).

By the way, this is running in Chrome Version 44.0.2403.130 m (64-bit).

I am facing a tight deadline, so any help is much appreciated!

Alex Gyoshev
Telerik team
 answered on 05 Aug 2015
2 answers
943 views

Good Evening,

I have an application in which I am using the DropDownList in combination w/ MVVM. The only issue that I am running into is that when the page first loads it will show the selected item, however it does not get that selected items value. For instance, on page load the Selected Item in the Dropdown is "Oranges" but the value stays unset until another item is chosen, then you are able to go back to the previous selected item and see the "Oranges" bound to its proper value.

I would think that it would since the model and view and bound together.

 

1.<input data-role="dropdownlist"
2.       data-bind="source: items, value: selected"
3.       data-text-field="text"
4.       data-value-field = "value"
5./>
6. 
7.<button data-bind="click: getSelected">Get Selected Value</button>

01.var vm = kendo.observable({
02.    getSelected: function () {
03.        alert(vm.selected);
04.    },
05. 
06.    items: [
07.        { value: 1, text: "Item 1" },
08.        { value: 2, text: "Item 2" },
09.        { value: 3, text: "Item 3" }
10.    ],
11. 
12.    selected: undefined
13.});
14. 
15.kendo.bind($("body"), vm);​

 

Vincent
Top achievements
Rank 1
 answered on 05 Aug 2015
3 answers
160 views

I have a DropDownList with serverFiltering. I need a way to show hints to the user as he types. I'd like the hint to show right below the filter box. I have ​several use cases in mind:

  • Please type 5 more characters...
  • Showing 20 first matches or 12,000. Please refine criteria to get more relevant results.
  • No records match your criteria.

I there a way do that?

Thanks

Boyan Dimitrov
Telerik team
 answered on 05 Aug 2015
1 answer
45 views

Hi,

 

I'm working with an application,In that application having an html  page with a kendogrid  with 8 columns. In desktop it should show all the columns of grid. But when we switch to mobile view it should show only three columns. can you please help me how to achieve this by using html5 and javascript.

 

Thanks & Regards,

Raghu S.

Iliana Dyankova
Telerik team
 answered on 05 Aug 2015
3 answers
241 views

Hi,

We are using the new "noRecords" feature, but it seems to have minor problems with edge cases. It seems that the message is not visible for grids with "auto" height (no explicit height specified on the grid). 

This is the example that the API documentation links to: http://dojo.telerik.com/

In that example, the message cannot be seen. In Chrome and IE it is completely hidden, and in Firefox it is mostly hidden. Shouldn't the message be visible no matter what? Or shouldn't the example you provide at least demonstrate that a min-height must be applied to the grid?

This is also a problem for non-scrollable grids: http://dojo.telerik.com/UZOPa

Thank you for you help,

-Jacob

DavidOBrien
Top achievements
Rank 2
 answered on 05 Aug 2015
1 answer
85 views

​The KendoUI charts proportions are incorrect for the supplied data when the given group field starts with a number.

If you look at: http://dojo.telerik.com/IquMa (or the attached File1) you will see when you hover over the bars the percentages shown don't actually match the proportion of the chart.

The same data but with a different group field name (not starting with a number) you end up with it working as per:
http://dojo.telerik.com/IPexa (or the attached File2), however the colours are wrong.

The above represents a simplified scenario but highlights the issue.

Iliana Dyankova
Telerik team
 answered on 05 Aug 2015
5 answers
1.0K+ views
Hello, I have a chart on my page, and I'm trying to change one column color (the black theme is applied, and unfortunately the first two colors appear to be blue and a lighter blue).  I've used the code below and I have successfully changed the color of one column, however the legend does not reflect the color change.  It shows black as opposed to the violet which is displayed in the column.  
$("#reqcovmre").kendoChart({
               theme: $(document).data("kendoSkin") || "black",
               title: {
                   text: "MRE Rations Requirements Coverage"
               },
               legend: {
                   position: "bottom"
               },
               seriesDefaults: {
                   type: "column"
               },
               series: [{
                   name: "Requirement",
                   data: [11044800, 12304800]
               }, {
                   name: "Production",
                   data: [9759443, 44415115],
                   color: "violet"
               }],
               valueAxis: {
                   labels: {
                       format: "{0:N0}"
                   },
                   majorUnit: 10000000
               },
               categoryAxis: {
                   categories: ["PEACETIME", "SURGE"]
               },
               tooltip: {
                   visible: true,
                   format: "{0:N0}"
               }
           });
Iliana Dyankova
Telerik team
 answered on 05 Aug 2015
1 answer
188 views

Hi,

I'm using the diagram control to visualize an underlying model. The user can then drag new elements onto the diagram and the underlying model is updated accordingly.

But when the user uses Ctrl+C to copy and then Ctrl+V to paste some elements the diagram looks okay but the underlying model isn't updated. Is it possible to either listen for the paste event and then update the underlying model or disable pasting entirely?

Thanks.

Regards
Niels

T. Tsonev
Telerik team
 answered on 05 Aug 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?