Telerik Forums
Kendo UI for jQuery Forum
3 answers
319 views

 

Angular Code to update datasource:

$scope.bindGroupCost = function (groupCostData) {            
            $scope.bindGroupCostData = new kendo.data.DataSource({ data: groupCostData });
            $scope.bindGroupCostData.read();                 
        }

 

HTML Code:

 <div class="k-content">
                                            <div>
                                                <div kendo-chart
                                                     k-title="{ text: 'Group Total Cost', position: 'bottom' }"
                                                     k-series-defaults="{ type: 'pie' }"
                                                     k-series="[{ field: 'groupCost', categoryField: 'groupName', padding: 0 }]"
                                                     k-tooltip="{ visible: true, format: 'Group Cost: {0} £' }"
                                                     k-data-source="bindGroupCostData"
                                                     k-series-hover="onSeriesHover"
                                                     style="width:100%; height:350px; border:1px;"></div>
                                            </div>
                                        </div>

Calling angular function from javascript:

angular.element(document.getElementById('tblContainer')).scope().bindGroupCost(JSON.parse(slices));

 

My problem is that when I am updating the 'slices' values at runtime, kendo pie chart is not updating the datasource and pie chart is not updating.

Please let me know how to refresh the keno chart when datasource is updating at runtime.

Look forward to hear from you.

Let me know if you need any more details..

Manas
Top achievements
Rank 1
 answered on 14 Jun 2016
4 answers
377 views

Hi,

I'm new to a .NET web app project that is using a DatePicker to switch between report dates (also new to Telerik's products as well).  Need to add a feature that highlights dates that have available reports.  

My question is: How do I add a legend to the calendar that says something like "Highlighted dates have reports available" either above or below where today's date is displayed?  When the calendar icon is clicked, the calendar drops down, but I can't seem to figure out how to put a legend/key on the calendar.  As far as I can tell, here is the code generating the attached DatePicker:

- In a .cshtml file:

@model DateTime?
 
<span style="width:6em">
    @(Html.Kendo().DatePickerFor(m => m).Format("yyyy-MM-dd"))
</span>

 

- And the call in another .cshtml file:

<td>@Html.EditorFor(m => m.ProdDate)</td>

 

Thanks for the help.

Bryan
Top achievements
Rank 1
 answered on 13 Jun 2016
4 answers
687 views

I am trying to configure a tabstrip as follows in an AngularJS app:

1st tab has some search controls and grid and is always visible - when user searches and get results there is a command column which is calling a function to dynamically append a new tab that is setting the contentUrl to a partial view (which of course has an associated controller) (i.e. contentUrl: 'views/myview.html'). I need to be able to pass a parameter (querystring or some other way) to the view/controller so it can load the actual expanded details of the record in a form layout but I can find no examples of how to do so (pass a parameter if it is even possible).  I've even tried setting up the actual view within an angular directive and having an attribute on the element with the necessary parameter but the tabstrip does not seem to recognize/render directives.  Also, the example I've seen for adding a close button to tabs does not seem to work in the Angular realm so I respectfully request that an example (if it is possible) of how to do that in a pure angular view/controller since you claim to support angular.

Michael
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 13 Jun 2016
7 answers
644 views
Hi,
Is it possible to format percentage numbers like this:
        Internal:               Display when not editing:                             Display when editing:
        0.99                        99%                                                                        99
I know that NumericTextBox supports displaying 0.99 as 99 % by using format: "p" and 99 as 99 % by using "#  \\%".
While is there a way to combine these two methods to display 0.99 as 99 % when not editing and 99 when editing?
And after the user changed the value to 95 convert it back to 0.95?

Thanks for the help in advance.
Dimo
Telerik team
 answered on 13 Jun 2016
3 answers
802 views

Hi.

I'm trying to get my inline delete buttons to work when I click OK. I know, I know, I've read about the autosync property but I don't want that on, because whenever I make a change to a field, it's making a change to the DB, I don't want that.

I want to achieve: when the user clicks delete, and clicks OK confirming the deletion, the dataSource.sync gets called to actually make the deletion/change in my web api controller.

I did this.

                                        remove: function (e) {
                                            dataSource.sync();
                                        },

And it doesn't make the change apparently. It certainly removes it from the model, as the row's getting deleted, but I click cancel, and it comes back. So this isn't firing.

Any help is appreciated. Thanks.

 

Michael
Top achievements
Rank 1
 answered on 13 Jun 2016
1 answer
166 views

Is there a way to programmatically set column.filterable.ui?

 

We are using the following

 filterable: { ui: function(element) { element.kendoNumericTextBox({ format: 'n', decimals: 10 });}}

to increase the number of decimals available to numeric columns.  However, we are having a problem serializing this using getOptions() and setOptions().  This data isn't retained when we use JSON.Stringify().  I can save data in the serialized json string that can allow me to recreate this; however, I have to be able to set the column.filterable.ui programmatically in order to restore it using the serialized json string.

 

Boyan Dimitrov
Telerik team
 answered on 13 Jun 2016
3 answers
573 views

Hello, 

Is it possible that the treelist loading looks like the grid loading ?

The treelist loading isn't even following the default height (in options).

A screenshot is attached.

 

Thank you

Iliana Dyankova
Telerik team
 answered on 13 Jun 2016
1 answer
1.9K+ views

I know, by applying kendo.culture() to kendoDatePicker control will set the localization to control and changes the name of month and day accordingly. But how can we change the name of month and day of datepicker control for language which does not have specified culture manually.

For e.g: I have a requirement to display datePicker for Belaurs which have culture (be-BY) and language as Russian. Kendo does not have a language package for the same. Is there any way for me to set the translation manually? .

When I checked the language pack of Kendo, Kendo provides "localization" property for controls like Upload, grid etc, where we can manually set the translated text to get them displayed (as shown below). Is there any option like that for "datePicker" ?

if (kendo.ui.Upload) {
kendo.ui.Upload.prototype.options.localization =
$.extend(true, kendo.ui.Upload.prototype.options.localization,{
  "cancel": "Beenden",
  "dropFilesHere": "Dateien hier fallen lassen zum Hochladen",
  "remove": "Löschen",
  "retry": "Wiederholen",
  "select": "Wählen Sie...",
  "statusFailed": "nicht erfolgreich",
  "statusWarning": "Warnung",
  "statusUploaded": "hochgeladen",
  "statusUploading": "hochladen",
  "uploadSelectedFiles": "Dateien hochladen",
  "headerStatusUploaded": "Hochgeladen",
  "headerStatusUploading": "Hochladen..."
});
}

There been many article and questions on Kendo control localization, but could not find answer to this particular scenario.

Stanimir
Telerik team
 answered on 13 Jun 2016
3 answers
393 views
Hello,
How can I disable "Add child", "Add Above", "Add below" menu items while adding new task?

I want to leave only one "Add Task" button without additional menu.

If I set "messages: { actions: {addChild: "", insertBefore: "", insertAfter:""}}" empty menu items are displayed.

"change" event argument does not have "preventDefault" method to cancel task selecting.

Is it possible to leave only one "Add task button"? If it is not possible, how can I remove the button from the footer of the Gantt (I'll add my own button). 
Dimitar Terziev
Telerik team
 answered on 13 Jun 2016
6 answers
783 views
Hi ,

I am using Kendo Listview component as shown below:

$("#showHide").kendoListView({dataSource: vals,template: "<div style='overflow: hidden;text-overflow: ellipsis;white-space: nowrap;margin:4px;'>#:name#</div>",selectable: "multiple",
change:  function() {
selected = $.map(this.select(), function(item) {
return vals[$(item).index()].name;
              });     
},
});

Now as per requirement , i have to set the width to 240px for div ("showHide"). Now ellipses part is working fine when data is greater than 240px but i am not able to show tooltip on that. After searching on Internet, I found that using offsetwidth and maxwidth we can do that but when i am trying to apply here it is not working.

Please see below code for offsetwidth and maxwidth which is not working :

_getMaxLiWidth : function(i){
 var maxWidth = 0;
 $('#showHide').each(function(i){
   if(this.offsetWidth > maxWidth)
     maxWidth = this.offsetWidth;
 });
 return maxWidth;
}

Is there any other alternative to implement the tooltip other then this. Please help.

Shafi
Top achievements
Rank 1
 answered on 12 Jun 2016
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
Drag and Drop
Application
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
DropDownTree
ListBox
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
Styling
ColorPicker
Pager
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
Licensing
PivotGridV2
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
LLM Kit
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?