Telerik Forums
Kendo UI for jQuery Forum
1 answer
199 views

I am using kendo.drawing.drawDOM to generate an exportImage. When running this on Chrome, the z-index of elements is not taken into account and certain elements will not overlap each other based on their z-index (i.e., how they are displayed in the browser). It works perfectly on IE and Firefox - this is just a Chrome issue. Is this a known issue? Is there a workaround by any chance?

Any help is appreciated!

T. Tsonev
Telerik team
 answered on 26 Jun 2015
3 answers
221 views

Hi.

Suppose I'm using some aggregation function which gives me several values instead of one. I have seriesClick event handler

with something like following:

var dsObject = e.sender.dataSource.get(e.dataItem.markerId);

And when I click on aggregated value it returns some value from datasource and I don't know why it returns this value. 

Is there any way to distinguish aggregated values from usual (from datasoure) values? Or is there any way to specify returned value in case of my aggregation function?

Thanks in advance. 

 

 

T. Tsonev
Telerik team
 answered on 26 Jun 2015
2 answers
128 views

I'm trying to create a custom column with the scheduler, but I always get redirected to a sample mvc program that just modifies the events template

 I need to actually make a new column, not change the color of it.

 The only templates I see listed in the docs are event templates.  I need the schedule header.  I want to display

<td>Monday</td><td>MyColumn1</td><td>MyColumn2</td><td>Tuesday</td>....

 The dataHeaderTemplate only lets me change whats inside of Monday.

 So my questions are, where are the lists of these templates and how do I get the default values so I can change them and create a new custom view.

This is the closest thing I've seen:

http://dojo.telerik.com/@diondirza/EbEBa

they're doing the following below.  But how I get the default value for schedulerHeader and add change it for my customer view.

function onDataBound(e) {
  var scheduler = e.sender,
      schedulerHeader = scheduler.element.find(".k-scheduler-header table tbody tr"),
      datas = scheduler.dataSource.data();
   
  // add custom column header, do more append for more column
  schedulerHeader.append("<th>Rating</th>");
  schedulerHeader.append("<th>Time</th>");
   
  // add custom column for each data
  datas.forEach(function(data){
    var uid = data.uid,
        timeData = kendo.toString(data.start, "hh:mm") + " - " + kendo.toString(data.end, "hh:mm");
     
    $(".k-task[data-uid='"+ uid +"']").parent()
        .after("<td>" + timeData + "</td>")
        .after("<td><em>no rating yet</em></td>");
  });
}

 

Georgi Krustev
Telerik team
 answered on 26 Jun 2015
1 answer
140 views

I saw another post back in 2012 addressing this issue of removing this value from the drop down.  Is it still true that this is not supported, or has this been updated in a recent version?

I tried updating the kendo.ui.Editor.defaultTools.fontSize.options.defaultValue.value, but it didn't hold.  I tried setting the defaultValue to the empty array, and that just crashed the control.  Is any of this possible?     

Dimo
Telerik team
 answered on 26 Jun 2015
3 answers
164 views

So I'm trying to move some of my data binding to templates to allow conditional formatting, but I've noticed something when binding a notes field directly to a <p> tag vs. rendering it in the Template. The binding adds <br> tags in place of the carriage returns so the notes format correctly; the template does not.

 Here's the template:

         # if(PeopleNotes != null && PeopleNotes != '' ) { # <div class='inputWrapper' id='main_notes'>
        <label for='main_notesInput'>Notes</label>
        <p id='NoteField'>#:  PeopleNotes #</p>
        </div> # } #

 

Which doesn't include the <br> tag, vs:

                <div class="inputWrapper" id="main_notes">
                    <label for="main_notesInput">Notes</label>
                    <p id="NoteField" data-bind="text: selectedPerson.PeopleNotes"></p>
                </div>

 which does. Suggestions?

Petyo
Telerik team
 answered on 26 Jun 2015
3 answers
137 views

Hi,

 Please help me: when I click to edit the category in: http://dojo.telerik.com/OHuHa it's error message: ...not response due to long-running script

 

Thanks

Linh Nam
Top achievements
Rank 1
 answered on 26 Jun 2015
3 answers
1.1K+ views

Hello, I'm using Kendo.Mvc and Kendo.UI for developing an ASP.NET MVC web application.
I have a Grid with ajax binding that reads data from a Datatable, those data could be of different types (string, int, double, bool, ecc..).
I have no model strongly typed associated for this Grid, thus I'll check for the type of each column and I do the bind for each column based of their type.

My problem is that this binding seems not to be working, because each column filter is treated as if it were of type string.

here some code snippet:

initialization: Html.Kendo().Grid<object>()
 
// other code
 
for each column:
        grid.Columns(columns =>
        {
            var bound = columns.Bound(Type.GetType("System." + col.Type), col.Name);
            // other code
            bound.Filterable(true);
        })
 
where col.Type is an enum similar to .NET TypeCode Enumeration (https://msdn.microsoft.com/en-us/library/system.typecode(v=vs.110).aspx)

I've also tried to add manually the type of column, after initialization of the grid, with some client side javascript code:

$.each(cols, function(i, e) {        
    var index = grid.columns.map(function(obj) {
            return obj.field;
        })
        .indexOf(e.Name);
 
    if(index > -1) {
        var item = grid.columns[index];
 
        switch(e.Type) {
            case "string":
                item.type = e.Type;
            break;
 
            case "double":
            case "integer":
                item.type = "number";
            break;
 
            case "boolean":
                item.type = e.Type;
            break;
 
            case "datetime":
                item.type = "date";
            break;                                               
        }    
    }
});

after doing this, I have a new "type" property for each column inside grid.columns but seems to not affect each column filter.

Some suggestion to achieve this?
Thanks a lot!

 

Mattia
Top achievements
Rank 1
 answered on 26 Jun 2015
1 answer
324 views

Hi :) 

In my web application I am using Kedno UI Controls for implementing front-end side controls and user interaction. Most of the web application code is written in java-script, so the general approach is to go client side.

On the Kendo UI demo website, we have 2 approaches for initializing kendo grid in case of using MVVM pattern and bindings (as a sample control, but this should apply to other controls):

1/ Data attribute initialization - part of example for brevity

<div data-role="grid"
     date-scrollable="true"
     data-editable="true"
     data-toolbar="['create', 'save']"
     data-columns="[
                    { 'field': 'ProductName', 'width': 270 },
                    { 'field': 'UnitPrice' },
                   ]"
     data-bind="source: products,
                visible: isVisible, events: { save: onSave }"
     style="width: 480px; height: 200px">
</div>

Full example: http://demos.telerik.com/kendo-ui/grid/mvvm

2/ Custom binding (angular way) - part of example for brevity

<div kendo-grid data-bind="options: mainGridOptions">
</div>
 
Javascript file - ViewModel/Controller - Scope ect...
.mainGridOptions = {
            dataSource: {
                type: "odata",
                transport: {
                    read: "<url...>"
                },
                pageSize: 5,
            },
            sortable: true,
            pageable: true,
            columns: [{
                field: "FirstName",
                title: "First Name",
                width: "120px"
                },{
                field: "LastName",
                title: "Last Name",
                width: "120px"
                },{
                field: "Country",
                width: "120px"
                }
            }]
        };

In the binding for the grid, we pass all required options for particular control. Full similar angular example: http://demos.telerik.com/kendo-ui/grid/angular

Concerning information above I have these questions:

  • Which approach is better and why (pron and cons) - to use data attributes for settings or to keep all the control settings in the view model in js and bind it easy to the control like angular does? Taking into account long term application development - support of tools and frameworks (i.e. Typescript), complex settings for controls
  • Is this bad idea or breaks MVVM pattern in anyway, that view model contains kendo object after it was initialized, so view model knows what is the control behind it? Of course not in every case, but in the situation when we need to do some workaround on our kendo control in js. In this case we don't need to use jquery selector to get control's data, because binding will give us a reference to the kendo control in the view model after its initialization.

This approach was implemented in Kendo Binding for Angular http://www.telerik.com/blogs/a-few-angular-kendo-ui-best-practices -> Leverage Widget References.

Thank you all for the feedback and answers.

Alexander Valchev
Telerik team
 answered on 26 Jun 2015
6 answers
431 views
Hello,

1. As soon as a connection is double clicked, an input pops up and the label may be entered. Is it possible to disable this functionality?
2. Is it possible to detect the hover event for shapes and connections?
3. Is it possible to allow only connected connections? In other words, connections which are connecting shape A and shape B.
4. is it possible to set the default connector dimensions? (diameter or radius).

Best regards,
Aleksander
T. Tsonev
Telerik team
 answered on 26 Jun 2015
1 answer
628 views
Hello,

I am interested in the scenario where a numeric textbox could be configured to allow special characters, in my case the "-" and "+" characters, but not necessarily in the beginning of the number.

For example

99-00+
37-34-

Would be acceptable values.

The value would therefore be a string, not a number

It seems to be infeasible but I am just trying to double check?


Plamen Lazarov
Telerik team
 answered on 26 Jun 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?