Telerik Forums
Kendo UI for jQuery Forum
1 answer
546 views

Hi,

I have a TypeScript class that I want to use in a DataSource for the schema.model property but also for initialising objects that are strongly typed in the rest of my TypeScript code. An example of such a class that seems to work is as follows:

 

export class Person extends kendo.data.Model.define({
        id: "id",
        fields: {
            id: { type: "string" },
            firstName: { type: "string" },
            lastName: { type: "string" },
            age: { type: "number" }
        }
    }) {
    id: string;
    firstName: string;
    lastName: string;
    age: number;
     
    constructor(id?: string, firstName?: string, lastName?: string, age?: number) {
        super();
        this.id = id;
        this.firstName = firstName;
        this.lastName = lastName;
        this.age = age;
    }
}

 

However, having the properties defined twice, once for the call to kendo.data.Model.define and then again for the sake of the TypeScript class is not ideal. Is there a better way to do this?

The following would be better if it created the field definitions automatically, but unfortunately it doesn't:

export class Person extends kendo.data.Model {
    id: string;
    firstName: string;
    lastName: string;
    age: number;
     
    constructor(id?: string, firstName?: string, lastName?: string, age?: number) {
        super();
        this.id = id;
        this.firstName = firstName;
        this.lastName = lastName;
        this.age = age;
    }
}

 

Alternatively, is it possible to move the kendo.data.Model.define() call to inside the constructor?

Thanks

Dean

Boyan Dimitrov
Telerik team
 answered on 22 May 2017
1 answer
366 views

Hi, I want to extend the default date column filter with something like "Last x days". User should can put the number of days (X). Is this possible to implement? Where can I find some information about extending filters or creating custom filters?

Georgi
Telerik team
 answered on 22 May 2017
5 answers
955 views

When the page loads the menu takes anywhere from 0.1 to 5 seconds to load. I have noticed this problem is the worst on Google Chrome with the debug tools open, and least noticeable on Internet Explorer 11 with the debug tools closed. I am unsure what is causing the slow rendering as the PanelBar I have in the same page does not have this problem and is rendered at the same time as the rest of the page. The menu is being created with the json datasource method.

Please let me know what I can do to speed up the rendering.

 

Nencho
Telerik team
 answered on 22 May 2017
1 answer
258 views
Is it possible to set a minimum slice size for pie chart series data?  Currently, we have pie charts that have percentage data, for example 65.1, 34.3, 0.6, so the 0.6 slice is barely noticeable.  Any way to increase the size of that piece?  Thank you
Tsvetina
Telerik team
 answered on 22 May 2017
1 answer
153 views

Hello.

Is there any way to export a large PivotGrid to a multipage pdf file?  PivotGrid PDF configuration doesn't seem to support "multiPage" setting.

For example, my grid can contain 150-200 columns and ~100 rows. Wondering if there is any way to save such a grid  as a set of A4 pdf pages.

Alex Hajigeorgieva
Telerik team
 answered on 22 May 2017
1 answer
492 views

We had a clear button in the file upload widget.

Kendo version: 2016.3.1028

We updated to version 2017.2.504 and the button dissapeared.

Also the upload button got totally wrong style.

It used to be like the <button type='button' class='k-upload-action'></button> it used to have the same style as the select button

Ivan Danchev
Telerik team
 answered on 22 May 2017
2 answers
133 views

I have a grid with a change event, that runs a function that builds another grid. My problem is, each time that second grid is loaded, its change event builds upon itself exponentially. 

 

I have re-created the issue in a fiddle here, https://jsfiddle.net/ctw5gh1o/

Any thoughts? It's like the data itself is not dumping completely each time the function is referenced

Preslav
Telerik team
 answered on 22 May 2017
3 answers
438 views

I'm using the kendo grid to filter values which occasionally contain html characters using explicitly defined filters.

When the filter values do not contain html, everything works as expected. However, when the values contain html characters, it causes the filter to return 0 rows when selected. In other words, it does not match any of the values in the grid. I added logic to strip out the html characters before adding to the filters, but this also returns 0 rows.

I tried using Html.Raw() when declaring the custom filter but it didn't have impact on this issue. Is there a way to make the filters handle html properly?

Stefan
Telerik team
 answered on 22 May 2017
1 answer
605 views

Hello,

I am trying to add a custom command to my Kendo Jquery grid and it works well if I just add text. Now I want to replace the text with an icon defined in a class and it works fine as long as there is some text defined but if I remove the command name or text then I get his error:

Uncaught Error: Custom commands should have name specified

So is there a way to define a custom command and "hide" the command text/name so only the image defined in the css class is displayed?

Here is the line where I defined my custom command:

columns: [
            { command: { className: "fa fa-pencil fa-fw", click: editInformation } },

....

]

Preslav
Telerik team
 answered on 19 May 2017
3 answers
328 views
Hi,

I have created a kendo ui diagram control using drag drop & trying to save the controls to a data source and retrieve the diagrams when users comes back to site next time.  I am new to kendo ui. Can someone share some sample code?

Thank you.
X
Top achievements
Rank 1
 answered on 19 May 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
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?