Telerik Forums
Kendo UI for jQuery Forum
2 answers
226 views

Hello,

How can I change shapes and connections text after adding them to the diagram?

For example, when a user creates a connection, an add event is called which contain a newly created connection object.

And I assigned text to the newly created connection object like this.

e.connection.options.content.text = "True"

 

 

 

But this text change did not apply.

Is there a way to redraw the options? after changing it? or is there any ways to change text dynamically?

Thank you!

Anton Mironov
Telerik team
 answered on 25 Jan 2021
4 answers
155 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
173 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.2K+ 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
155 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
518 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
520 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
322 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
130 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
133 views
Hi,
In gantt chart, can I see Year slots in Week and Month views??
Stoyan
Telerik team
 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
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?