Telerik Forums
Kendo UI for jQuery Forum
3 answers
131 views
Hey just a quick thing,

I tried to use a kendo.View fed by html containing kendo-template expressions:
   
 var viewModel = kendo.observable({       
        test: '123'
 }); 
var
myFailedView = new kendo.View('<span data-bind="text: test"></span> #: location.href #', { model:viewModel, evalTemplate: true });

var mySucessfulView = new kendo.View('##<span data-bind="text: test"></span> #: location.href #', { model:viewModel, evalTemplate: true });

I would expect it to render  a span with 123 followed by the current location of the browser. But it only renders the span. If I start with an empty template expression "##" it behaves as expected. Is that a bug or did I miss something in the documentation?

For reference see JsFiddle

Regards,
Kris


http://jsfiddle.net/9y36opsk/

Stefan
Telerik team
 answered on 02 Feb 2017
2 answers
171 views
We are having data with five series out of which plotting only two. User can choose to select a series in place of an existing one in which case I want the chart to redraw only the changed series. As of now it redraws the whole graph including the one which was not changed. It causes confusion in the user if both have been changed for the person using it.
shaneed
Top achievements
Rank 1
 answered on 02 Feb 2017
6 answers
321 views

I want to sort rows and columns by values (not fieldnames).

One way to do that is like it's done by DevExpress (https://demos.devexpress.com/ASPxPivotGridDemos/OLAP/Browser.aspx + see attached screenshot). By right clicking a field i can choose for with field, row, column and measurement i want to sort. But even this solution could be more userfriendly.

Another more direct solution would be to sort by clicking on a measurement field or if there is only one, on a fieldname.

Both are just suggestions. But the functionality of sorting by values is really relevant.

I couldn't find any solution for this build-in in Kendo UI. Therefor this is a feature request/suggestion.

Robert
Top achievements
Rank 1
 answered on 02 Feb 2017
1 answer
336 views

Hi

 

I have a kendo grid that can be changed user method and I have and option that automatically sets the values from a certain column if have a certain conditions.

 

My problem actually is when I do the automatic option, I need to launch the save event, because it validates certain data via server, and I need to access to my custom editor (is a combobox) and change his value and then launch the save event. The problem is if I change the combobox via code, the save event never launches. What I do is:

 

1. Click the "td" that contains the combobox

2. Change the combobox value

3. Click in another place to launch the save event

4. Nothing happens, that column on the grid is actually empty

 

Any ideas what can I do?

Stefan
Telerik team
 answered on 02 Feb 2017
3 answers
135 views
01.buildForm(form) {
02.    const tableLayout = new kendo.Layout('<table class="table table-bordered" id="tbl"></table>' ,{wrap: false});
03. 
04.    for(var i=0;i<form.rows.length;i++) {
05.      const trLayout = new kendo.Layout('<tr id="tbl_row_'+i+'"></tr>' ,{wrap: false});
06.      for(var j=0;j<form.rows[i].cols.length;j++) {
07.        const tdLayout = new kendo.Layout('<td><a href="#" data-bind="click: alertme">'+form.rows[i].cols[j].label+'</a></td>' ,
08.        {
09.          wrap: false,
10.          evalTemplate: true,
11.          model: {
12.            alertme: function() {
13.              console.log('alert!');
14.            }
15.          }
16.        });
17.        trLayout.append('#tbl_row_'+i+, tdLayout);
18.      }
19.      tableLayout.append('#tbl',trLayout);
20.    }
21.    return tableLayout;
22.  }

01.const form = {
02.     rows: [{
03.        cols: [{
04.           label: 'Row 1 Col 1'
05.       }, {
06.           label: 'Row 1 Col 2'
07.       }]
08.     },{
09.        cols: [{
10.           label: 'Row 2 Col 1'
11.       }, {
12.           label: 'Row 2 Col 2'
13.       }]
14.     }]
15.   };

Hi,
I'm trying to append child layouts to a parent layout.
Is it feasible?

I'm using ES6, npm and bower to install kendo ui professional.

Thanks
Stefan
Telerik team
 answered on 02 Feb 2017
1 answer
529 views

My team recently upgraded from 2016.2.504 to 2017.1.118 and we noticed the following issue with formatting 7 (and 10) digit negative numbers, where-in the first group separator is missed.

kendo.toString(-1234567, "\#,0;(\#,0); ") -> "(1234,567)"

2016.2.504 (This works):
http://dojo.telerik.com/IqujA/2

2016.2.607 Slightly newer version breaks it.

http://dojo.telerik.com/IqujA/3

Current version still broken:

http://dojo.telerik.com/IqujA/4

Our issue appears to have introduced with this commit: https://github.com/telerik/kendo-ui-core/commit/17b08eab51d0761e187c849f77fe0db8180e7357

Is this the intentional behavior going forward or a bug?

Stefan
Telerik team
 answered on 01 Feb 2017
3 answers
1.2K+ views

Hi

We  are creating  a pdf using the drawing api which creates a open / save / cancel dialog in the browser allowing the user to open the pdf in Acrobat and then print it. Some users (senior managers) are complaining that this multi stage process is too long (they are used to our windows client app that outputs directly to their local printer). Is there any way we can bypass the first dialog and automatically open the pdf in Acrobat are display the print dialog?

I have see this: http://www.telerik.com/support/kb/reporting/details/print-a-report-directly-at-client-side-without-displaying-it-in-a-viewer

but I don't really understand whether we can use any of it?

 

Any help or suggestions would be gratefully received.

Thanks

James

Marin Bratanov
Telerik team
 answered on 01 Feb 2017
3 answers
166 views

Hi Forum,

When I change the DashType of the new Chart for Angular 2.x, the change is not reflected in the legend.

When I change the colour, for instance it's reflected.

Is that the expected behaviour or is it a bug, and could you suggest a fix/workaround for this.

Thanks in advance.
Cheers.

Stefan
Telerik team
 answered on 01 Feb 2017
2 answers
1.0K+ views

Hello everyone,

right now the Angular2 AutoComplete compontent only supports string values, which is not sufficent in a scenario, where you want to find for example a customer based on his name. There could be multiple entities with the same name, but I also do not want to display the database id to the user. So what to do?

I hope, that this will get implemented in the AutoComplete Component soon, but for now this is my workaround I would like to share:

1. You have to modify the autocomplete.component.js so it will accept complex objects without throwing an exception. 
Remove the if statement from lines 315-317: 

if (util_1.isPresent(newValue) && typeof newValue !== "string") {
            throw new Error("Expected value of type string. See http://www.telerik.com/kendo-angular- ;           ui/components/dropdowns/autocomplete/#toc-value");
}

 

Remove the first "toLowerCase()" call from line 426, so it should look like this:

else if (text && text === this.searchbar.value.toLowerCase()) {

 

And that is it. You can now pass an Array of customers to as [data]

<kendo-autocomplete #customersAutocomplete
                    [data]="customers"
                    [(ngModel)]="selectedCustomer"
                    [suggest]="false"
                    [filterable]="true"
                    (filterChange)="customerTextChange($event)">
    <template kendoAutoCompleteItemTemplate let-dataItem>        
            <span>{{dataItem.firstName}} {{ dataItem.lastName}}</span><br />
            <span>{{dataItem.birthDateLocal}}</span><br />
            <span>{{dataItem.customerNumber}}</span><br />
        </div>
    </template>
</kendo-autocomplete>
<button *ngIf="customersAutocomplete.value"
        (click)="selectedCustomer=null; customersAutocomplete.value=null;">x
</button>

 

However there are some things you have to be aware of:

When you select a value from the AutoComplete there will be two consecutive value changes. First will be your complex object, the second will be the string representation (customer.toString()). So I recommend, that you use a setter on your ngModel:

public set selectedCustomer(value: Customer) {
        if (!value || value instanceof Customer) {
            this._selectedCustomer= value;
        }
    }

 

You also should write a toString() on your model, that you can display to the user.

I hope this helps some people and maybe serves as a suggestion for the Telerik guys.

 

Niels
Top achievements
Rank 1
 answered on 01 Feb 2017
1 answer
900 views

Hi, 

I've created an inline grid to perform CRUD operations, but am having a slight problem with validation. The standard inline grid validates its fields based on the attributes of the schema and the column (I think). My grid has custom editors for each value displayed, I assume this is why the 'validation' details of each schema attribute are ignored. Please correct me if Im wrong.

How can I trigger the Inline Grid validation for my custom fields so any resulting error messages are displayed as Tooltips (eg; http://demos.telerik.com/kendo-ui/grid/editing-inline) instead of additional elements like the standard validator?

Thanks In Advance,
Grant

Dimiter Topalov
Telerik team
 answered on 01 Feb 2017
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?