Telerik Forums
Kendo UI for jQuery Forum
11 answers
580 views

We are using kendo’s support for conditional formatting to build custom masks. For example:

kendo.toString(value, ‘\\$0;-\\$0’) // e. g. -$100 or $100

The problem is that kendo picks which side of the conditional formatting to use BEFORE rounding is applied. Thus we can end up with a display of negative zero:

kendo.toString(-.01, ‘\\$0;-\\$0’) // -$0

Note that this is similar to this issue: http://www.telerik.com/forums/issue-rounding-to-zero---getting-negative-zero, however that issue is for the built-in n2 format whereas our issue is for conditional formats.

Note that in C#/.NET, the behavior of conditional formats matches what we want:

Console.WriteLine((-.01).ToString("$0;-$0")); // $0

For reference, the reason we are building masks like this is because we have user-defined “front” and “back” symbols which should go between the negative/positive sign (or parens if we are using parens for negation) and the number itself. We thus want -$100 or ($100) instead of $-100 or $(100).

It would be great if kendo’s behavior matched .NET in this regard since it seems to be so similar otherwise and in general the .NET behavior seems preferable in most cases.

Also posted on StackOverflow: 
http://stackoverflow.com/questions/39977914/kendo-format-string-puts-literal-in-the-wrong-place

http://stackoverflow.com/questions/39977630/kendo-conditional-formatting-results-in-negative-zero

Viktor Tachev
Telerik team
 answered on 15 May 2018
1 answer
163 views

All the samples reference specific cells

https://demos.telerik.com/kendo-ui/spreadsheet/validation

The need is to be able to define validation for columns in the sheet to enforce a template... the data isn't being manually created with the sheet.  I feel like most of the samples (all?) seem to be setup with creating the row\cell on init, and that's valid for like template\header\footer setup but not real-world data usage.

sheet.range("A2:A40").validation({
                dataType: "custom",
                from: "SEARCH(\"@\")",
                allowNulls: true,
                type: "warning",
                messageTemplate: "Invalid email"
            });
Ianko
Telerik team
 answered on 15 May 2018
1 answer
80 views

Hi.

We use an editor control to display text. This control works fine in FireFox, Chrome and Edge.

When trying to use the control in IE11 (with JQuery 3.X), the editor spellchecks all the time, entailing slow performance.

A dojo can be found here: https://dojo.telerik.com/OCoBApiw

It is more clear if there's a lot of text in the control.

To replicate:
Open Dojo and run in IE11.

Write 15 lines of gibberish (asfijasf ajsif ajs fjaif etc.)

Press backspace OR move mouse in and out of control

Is this a known issue, and what can I do to accomodate it?

Neli
Telerik team
 answered on 15 May 2018
1 answer
1.1K+ views
I'am trying to export the Grid to PDF but I get http 404 errors because the font files cannot be downloaded.

My css definition looks like:

@font-face{font-family:DejaVu Sans;font-weight:700;src:url(/dist/DejaVuSans-Bold.ttf)}

But the fonts are hosted in this location http://somedomain/subdirectory/dist/DejaVuSans-Bold.ttf but the PDF export is looking at  http://somedomain/dist/DejaVuSans-Bold.ttf so I get 404 errors. He doesn't take into account the subdirectory.

I tried to use the kendo.pdf.defineFont to point to the correct location of the fonts files but the PDF Export doesn't pickup these settings

kendo.pdf.defineFont({
 'FontAwesome': '/subdirectory/dist/icons.ttf',
 'DejaVu Sans': '/subdirectory/dist/DejaVuSans.ttf',
 'DejaVu Sans|Bold': '/subdirectory/dist/DejaVuSans-Bold.ttf',
 'DejaVu Sans|Bold|Italic' : '/subdirectory/dist/DejaVuSans-BoldItalic.ttf',
 'DejaVu Sans|Italic' : '/subdirectory/dist/DejaVuSans-Italic.ttf'
 });

 

The subdirectory is dynamic and set while deploying the application so I cannot change the url in the CSS files in front.

Stefan
Telerik team
 answered on 15 May 2018
2 answers
121 views

So I need my spreadsheet to have a header row, and every row below be where the data is entered... so I've got that setup fine I think.

Now I need to define validation rules on ranges, so like K2:K40 can only have 1-5... I was able to do this in the widgetCreated event

sheet.range("K2:K40").validation({
                type: "warning",
                from: "1",
                to: "5",
                allowNulls: true,
                comparerType: "between",
                dataType: "number",
                messageTemplate: "PGYs are 1-5"
            });

 

My current struggle though is being able to find out the total validation errors in the sheet... the code provided here

https://www.telerik.com/forums/retrieve-validation-errors-programatically

and here

https://docs.telerik.com/kendo-ui/controls/data-management/spreadsheet/how-to/get-flagged-cells

Always fails, the "cell.validation" in range.forEachCell is always undefined... what am I doing wrong here?

 

Joana
Telerik team
 answered on 14 May 2018
3 answers
257 views

Hello,

I'm about to implement the DropDownList Client Filtering function as per http://demos.telerik.com/aspnet-mvc/dropdownlist/clientfiltering.

However, due to the complex CSS of my site, the magnify glass icon in the search box has been mis-aligned.

I'm struggling to find the CSS that relates to the said icon.

Please can someone tell what CSS I need to adjust the icon?

Or can someone please tell me how to move the icon 5 pixels to the left?

Thanks in advance.

Ivan Danchev
Telerik team
 answered on 14 May 2018
1 answer
7.6K+ views
How do I add a button to the toolbar of a grid? There isn't much documentation other than using the default commands, which aren't helpful. Ideally, I should be  able to say, 


toolbar: [{
name: 'new',
id: 'createNew',
text: "Create New ",
click: function(e) {
// do stuff
}
}]

I've seen other solutions where I define a template, but I think that is a poor solution, especially if your app is highly modularized. How do you add a button via config options?
Georgi
Telerik team
 answered on 11 May 2018
1 answer
134 views

I am using the Telerik WPF controls and the KendoUI for JQuery.  Can the KendoUI scheduler read the same exception format as the WPF?  For example, my exception now is:

"05/09/2018 06:00:00`05/09/2018 06:00:00`05/09/2018 11:00:00`|"

How would that be for Kendo? And is there an easy way to translate if different?

 

Plamen
Telerik team
 answered on 11 May 2018
5 answers
719 views

Hi there,

On my bar chart individual bars trigger JS code via the onSeriesClick which is working fine.  If you hover over the bar it slightly changes the colour which is helpful so the end user knows it's clickable.  However, sometimes bars are really short and it's therefore hard for them to tell they can click it and it's hard to click as it's such a small area to click.

I also have labels on each bar.  I would like to extend the onSeriesClick event so that if you click the label it also triggers the event.  I noticed it does this by default on high resolution screens, but on small screens this functionality seems to disappear.

Is it possible to make this behaviour work for all resolutions somehow?

Below is my view code, and I've attached a screenshot of the graph.  The arrow on the screenshot is an example - the red bar is the only clickable part for low resolution screens, but I'd like to be able to click the label text over the top too to trigger the event.

 @( Html.Kendo().Chart<Models.RecommendedActionItemsBarChartModel>()
                .Name("recommendedActionItems")
                .ChartArea(chartArea => chartArea.Background("#F5F5F5"))
                .Title(title => title
                    .Text("Recommended Action Items")
                    .Position(ChartTitlePosition.Top))
                .DataSource(ds => ds
                    .Read(read => read.Action("RecommendedActionItemsBarChart", "Reporting"))
                    .Group(g => g.Add(d => d.category))
                )
                .Series(series => series
                    .Bar(d => d.Share, d => d.Color).CategoryField("category")
                    .Name("#:group.value#")
                    .Stack(true)
                    .Labels(labels => labels
                        .Visible(true)
                        .Template("#= dataItem.category # #= value # (#= dataItem.PercentageField #)")
                        .Position(ChartBarLabelsPosition.InsideBase)
                    )
                )
                .CategoryAxis(axis => axis
                    .Visible(false)
                )
                .ValueAxis(axis => axis
                    .Numeric()
                    .Labels(labels => labels
                        .Visible(false)
                    )
                )
                .Tooltip(tooltip => tooltip
                    .Visible(false)
                )
                .Legend(legend => legend
                    .Visible(false)
                    .Position(ChartLegendPosition.Bottom)
                    .Labels(x => x.Font(font: "9px Arial,Helvetica,sans-serif"))
                )
                .Events(events => events
                    .SeriesClick("onSeriesClick_recActionItems")
                    .DataBound("onDataBound_recActionItems")
                )
)

Thanks,

Mark

Stefan
Telerik team
 answered on 11 May 2018
3 answers
242 views

Hi, 

In short I want to know how to access the value of a parent's sibling attribute in the MVVM observable object. I do have a solution but I would like to know if the best option for me to use.

http://dojo.telerik.com/AZEZixAs

Thanks,
Grant

David
Top achievements
Rank 1
 answered on 10 May 2018
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?