Telerik Forums
Kendo UI for jQuery Forum
4 answers
189 views

Hello.

There is a bug with diagram.addConnection();

I followed the sample in this page (https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/diagram/methods/addconnection), and I'm getting an error when clicking on the connection.

I created a Dojo snippet (https://dojo.telerik.com/eluKEMOn) and you can reproduce the bug by

1. Clicking the Run button.

2. Clicking the connection that connects the shapes.

This generates an Uncaught TypeError: Cannot read property 'tools' of undefined, and this messes up the diagram.

Is there a workaround to this? I need to add connections after the diagram is initialized.

And addShape() takes both kendo.dataviz.diagram.Shape() and a plan object like this.

{
  id: "2",
  content: {
    text: "State 2"
  },
  x: 300,
  y: 20
}

But addConnection only takes kendo.dataviz.diagram.Connection().

Do you have any plans to accept a pure javascript object for addConnection()?

Attached is the screenshot of an error produced by the Dojo snippet.

Thank you!

Georgi
Telerik team
 answered on 22 Jan 2021
2 answers
203 views

Hello.

I'm trying to change shapes and connection styles after shapes and connections are added.

I found an answer (https://www.telerik.com/forums/change-color-of-shapes-dynamicaly) but it looks like shape.shapeVisual does not have domElement property anymore.

How can I change change shapes and connection styles dynamically?

Thank you.

Anton Mironov
Telerik team
 answered on 22 Jan 2021
12 answers
4.4K+ views
Hi,

I have a kendo grid, and there is a button on click of which i need to hide some of the columns. And on click of other button same columns which were hidden, needs to be shown again. Found in some forums that it can be achieved by changing the column definition but that does not seem to be a good approach. Please help.

Regards,
Khushali
Nikolay
Telerik team
 answered on 22 Jan 2021
1 answer
178 views

when the user type in toolbar search box & search operation performs or search box was cleared, this will help a lot, new we have to use our own search toolbar implementation  for components integration 

 

$(this.searchBoxController).on("search", this.ResetSelection.bind(this));
Neli
Telerik team
 answered on 22 Jan 2021
4 answers
565 views

Hello.

We have to implement a functionality, where the user can create multiple spreadsheet objects via drag and drop.

This part works perfectly, but we got a report regarding Data Validation using custom Formula. 

If the user writes a correct formula, everything is fine, but when it is an invalid one (e.g. >3), we receive a ParseError exception. The message is this: "Parse Error (input >2)".

I tried to validate the formula in the Changing event, but there is no interface to directly call the validation without further implications.

My first try was to create a formula using defineName and if it does throw an exception I stop the process via the preventDefault function. In the case of a ParseError it worked, but it created other exceptions as we have a lot of code attached on nearly all of the events and the defineName function seems to create more events, which will eventually fail (for us at least).

My second try was to create a formula on a cell and as in the solution before, in case of exception, abort the process, otherwise allow it to go on. However this wasn't a good idea because it can corrupt the already existing data.

 

So my question would be, is there some way to validate a custom formula in the Data Validation and stop it from causing further problems? To catch the exception is quite difficult, because of the dynamic allocation of the spreadsheets, or maybe there is a certain point where this can be caught?

 

Thank you for your answers, 

Norbert Kocsis

 

 

Plamen
Telerik team
 answered on 22 Jan 2021
1 answer
563 views

Hi

I want to have 2 dropdownlists but I want to hide the second list if nothing gets populated into it.

You would first choose from Dropdown A, if the selection of Dropdown A does not populate anything into Dropdown B then I want to hide Dropdown B, If something is populated into Dropdown B then I want to show it.

I thought DataBound Event would do this and be fired each time something switched in A  but what I am noticing, that if I say make a choice in dropdown A which renders a result in Dropdown B then the databound event is triggered, then if I go and make another choice on dropdown A which renders no result in B the databound event is triggered.

However after that no databound event is triggered.

@(Html.Kendo().DropDownListFor(x => x.Country)
 
                                .OptionLabel("Select country...")
 
                                .DataValueField("Code")
 
                                .DataTextField("Name")
 
                                .Filter(FilterType.Contains)
 
                                .DataSource(ds => ds.Read(r => r.Action("GetCountries", "Countries")))
 
                                )

 

 

@(Html.Kendo().DropDownListFor(x => x.State)
 
                         .OptionLabel("Select State")
 
                         .DataValueField("Code")
 
                         .DataTextField("Name")
 
                         .Filter(FilterType.Contains)
 
                         .DataSource(ds => ds.Read(r => r.Action("GetStates", "States").Data("getCountryCode")))
 
                         .CascadeFrom("Country")
 
                         .Enable(false)
 
                         .Events(e =>
 
                          {
 
                              e.DataBound("onStateDataBound");
 
                          })
 
                         )

 

function onStateDataBound(e) {
    if (e.sender.dataSource.data().length <= 0) { // hide } else {// show}
 
}

 

Ivan Danchev
Telerik team
 answered on 21 Jan 2021
1 answer
374 views

I'm not an expert - but most of the work that I have seen on developing REST Apis show the default if you want to get a list of resources from an api that you should make the endpoint something like /api/resources with a get call.  Similarly if you want to create a resource, your endpoint would be something like /api/resource with a Post call and include the data to be created in the body of the request.  

On numerous occasions, I have been caught up because a forgot that Telerik expects its endpoints to be decorated with an additional term resulting in endpoints such as /api/resources/all and /api/resource/create etc.  Why does Telerik do this?  Is there any configuration that you can set so that you can use what for me at least is the more standard REST Api endpoints?

Plamen
Telerik team
 answered on 21 Jan 2021
1 answer
151 views

 

Controller Method

public ActionResult EditSupplierTeamReps(DataSourceRequest incoming, ManageSuplierTeamRepViewModel supplierTeamRep)
{
   DoTheThing(supplierTeamRep)  
    return Json(result);
}
Veselin Tsvetanov
Telerik team
 answered on 20 Jan 2021
1 answer
161 views
Hi,
In gantt chart, can I see Year slots in Week and Month views??
Stoyan
Telerik team
 answered on 20 Jan 2021
18 answers
3.5K+ views

I have a situation where an administrative user creates an Excel file using her desktop copy of Excel and saves it to a location on our server. What I want to do is load that file from the server into a Spreadsheet control, have a user make changes in the Spreadsheet, and then click a button to save it back to a location on the server.

I see plenty of examples of importing files from the user's local system and exporting them to the user' local system. However, I don't see any examples of loading a file from the SERVER when the spreadsheet first loads. Similarly, I can't find an example of saving the spreadsheet contents as an Excel file on the SERVER.

Can somebody please provide an example of this?

Thank you!

greg
Top achievements
Rank 1
 answered on 20 Jan 2021
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
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
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?