Telerik Forums
Kendo UI for jQuery Forum
2 answers
137 views

Hi, we used Kendo for a while, and during all our experiences, we found that one thing is missing from all documentation: 

All the available properties of an "item", when we load a component from a dataSource.
The closest from a documentation I found is this one:
https://docs.telerik.com/kendo-ui/api/javascript/ui/menu/configuration/datasource

But, to get all available properties of item, we must read tons and tons of documentation, and guess them!

I am sure you have an official list of what this "item" should be?

This same item seems to be available in

  • menu + contextMenu
  • panelBar(accordion)
  • treeview
  • and more...

I think you should create 1 single page of documentation for how an "item" can be configured.
I may have almost all of them there, but I'm not sure: 

var sampleItem = {
    text: "<b>texte</b>",
    encoded: true, // default, allow htmlEncode of "text" property
    cssClass: "itemClass", // apply style to "text"
    // url: "http//xxx", //used to open link on click
    attr: { data_key1: "value1", data_key2: "value" }, //may be used on "select" event
    // content + contentAttr -- DO NOT USE :D
    content: "text", //ignore all templating, and set this raw text as subitem content.
    contentAttr: {
        style: 'border: 1px solid red; padding: 2px;', // Add attributes to the content container
        data_key3: 'value3'
    },
    imageUrl: "/img/sample.png",
    imageAttr: {// Add additional image attributes
        alt: 'Image',
        height: '25px',
        width: '25px'
    },
    items: [{
        text: "child1"
        //recursive...
    }],
    spriteCssClass: "spriteClass", // can be used to append icon before text??
    select: function (e) {
        console.log("select");
    }
};

Nencho
Telerik team
 answered on 24 Jun 2019
7 answers
796 views

Hi there,

I am using this method 'kendo.drawing.pdf.saveAs' to export pdf. Is there a callback or a promise in this method. Or is there a way to know when the download is accepted or canceled by the user?

Thanks in advance!

Alex Hajigeorgieva
Telerik team
 answered on 21 Jun 2019
1 answer
173 views

Hi all, 
The documentation on the kendoScrollvView demo link appears to be wrong: https://demos.telerik.com/kendo-ui/scrollview/index

The provided css contains a #scrollview-home string. However, this should be just #scrollview, not #scrollview-home:
("#scrollview-home .photo { display: inline-block; background-size: cover; background-repeat: no-repeat; background-position: center center;}")

However, when I correct it, I still can't get the background image to properly cover the widget. It centers the image, but it contains overflow on the side which expands the width of the widget and expands out to the next screen. Is there an example how to use this widget on an adaptive site?
Thanks for your advice, 

Gregory

Alex Hajigeorgieva
Telerik team
 answered on 21 Jun 2019
1 answer
466 views

Hi,

I'm trying to populate events in the scheduler however i cannot get the event items to show.

 

I have checked and the json that is returned looks like this:

{
    "title": "Start up all PCs",
    "start": "2013-06-06T08:00:00",
    "end": "2013-06-06T08:05:00"
  },
  {
    "title": "20 min test",
    "start": "2013-06-06T08:05:00",
    "end": "2013-06-06T08:25:00"
  }

The scheduler setup looks like this: 

    $("#scheduler").kendoScheduler({
        views: ["day"],
        startTime: new Date("2013/6/6 08:00"),
        endTime: new Date("2013/6/6 20:30"),
        dataSource: {
            batch: true,
            transport: {
                read: {
                    url: "Templates/getappointments/@Model.TemplateID",
                    dataType: "json"
                },
                parameterMap: function(options, operation) {
                    if (operation !== "read" && options.models) {
                        return {models: kendo.stringify(options.models)};
                    }
                }
            },
            schema: {
                model: {
                    fields: {                        
                        title: { from: "Title", defaultValue: "No title", validation: { required: true } },
                        start: { type: "date", from: "Start" },
                        end: { type: "date", from: "End" }
                    }
                }
            }
        },
        editable: false,
        footer: false,
        currentTimeMarker: false,
    });

 

I have tried a lot of things however i cannot get the events to show. 

 

Nencho
Telerik team
 answered on 21 Jun 2019
1 answer
400 views

Hello,

I'm trying to customize a span element to look like a validation popup with the arrow on top pointing to an input element.  I am not able to use validation in this case, and I'm trying to display a tooltip instead.  I have the following:

<span id="validation" class="k-widget k-tooltip k-tooltip-validation k-x-invalid-msg-block"></span>

 

The code above almost works, however, the little directional arrow on top of the span is not displayed.  If I include 'k-callout' and 'k-callout-n' then the entire span moves and is distorted.  Can anyone help me get the little arrow to show up?   Any help is appreciated. Thanks!

Eyup
Telerik team
 answered on 20 Jun 2019
1 answer
1.0K+ views

On grid right click context menu's open event, how does one get the grid row's data item:

function grid_menu_open(e) {

}

Edward
Top achievements
Rank 1
 answered on 19 Jun 2019
3 answers
220 views

I tried finding something similar in this forum but maybe I'm not using the right terms, so here it is:

I have a custom model (created using kendo.define), lets call it "Master". It has a property "Children" which is an ObservableArray of another custom model. A property (say, "Type") defined in Master is rendered in children template. If this property changes, the child template doesn't re-render.

  1. Question 1: Considering such a setup where a master property is rendered in a child template, how can child re-render when master property changes?
  2. Question 2: Is there a better way to convert server-provided data into custom Model objects than what is being done in the example?

I have read that data sources should not be nested so deeply, is that the problem? What would be a more appropriate approach for MVVM with a nested model?

Example Dojo: https://dojo.telerik.com/isiNeJaF

Angel Petrov
Telerik team
 answered on 19 Jun 2019
2 answers
166 views

Hello Telerik team, 

I have already checked older threads considering similar problems, but I still can't get it to work.

ngAfterViewInit(): void {
        this.scrollDiv = document.getElementsByClassName('k-virtual-content')[0];
        this.scrollDiv.addEventListener('scroll', this.onScroll);
    }
 
public onScroll($event: any) {
        this.scrollTop = $event.target.scrollTop;
    }

 

The problem arises when I scroll to some position, then change gridData so that I end up with another set of data entries with a different scrollTop position (e.g. empty with scrollTop 0) and when I come back to the initial data (change gridData again), then I end up having the initial skip value but scrollTop of 0 instead of my old value. 

So how can I utilize the scrollTop value? So far I have tried 

this.scrollDiv.scrollTop = this.scrollTop;

 

but I don't think this one can also act as a setter. Can I open a Feature Request for a grid method that does this?

 

Cheers and thanks in advance!

Svet
Telerik team
 answered on 18 Jun 2019
7 answers
1.0K+ views

Hi,

I've created a custom tool for my Kendo Editor control. It's a paragraph background color (as opposed to the back color control that only put the background around a span). I've got this more or less done however I've came across a limitation on the HSV color picker. If I pick a color such as red and hit apply this fires the change event which I can then use to set a paragraph I'm currently highlighting to however if I want to make another paragraph the same color by clicking on the colorPicker and clicking apply the change event doesn't fire. It seems I need to change the color every time in order for this event to be fired.

So I was wondering if there was anyway to catch the apply event when the color hasn't changed?

Cheers,

Tyler

Ivan Danchev
Telerik team
 answered on 18 Jun 2019
4 answers
359 views

In a simple example like this - https://dojo.telerik.com/UViBAZAP How to mark the field dirty? I want to make changes first and then save at one go.

Also, If I set the field value, the field should be marked dirty, for the user to know it was changed. Is there any way to achieve this?

var data = $('#gantt').data().kendoGantt.dataSource.data()[0];
data.set(start, new Date('06/13/2019');

 

Petar
Telerik team
 answered on 18 Jun 2019
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?