org chart editable.fields => set editable: false doesnt work

3 Answers 60 Views
OrgChart
Ruth
Top achievements
Rank 1
Iron
Iron
Ruth asked on 18 Oct 2022, 08:20 AM

hi,

I am trying to implement the following example

https://docs.telerik.com/kendo-ui/api/javascript/ui/orgchart/configuration/editable.fields

But it doesn't seem to work even on the website

Am I right?

I expect that after the implementation I will not be able to edit the fields shown in the edit popup.

 

3 Answers, 1 is accepted

Sort by
0
Lyuboslav
Telerik team
answered on 19 Oct 2022, 02:44 PM

Hi Ruth,

The described issue is due to a mistake in the demonstrated example in the API. If you don't want your OrgChart to be "editable" you should set  the "editable" option to false like the snippet below:

 editable: false

Here is the dojo example where this is demonstrated.

We will update the example in the API accordingly as soon as possible. As a small token of gratitude for reporting an issue in our documentation, I have updated your Telerik points.

Regards,
Lyuboslav
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Ruth
Top achievements
Rank 1
Iron
Iron
answered on 23 Oct 2022, 07:58 AM

Hi Lyuboslav,

Thanks for your response, The solution you offer completely blocks the possibility of viewing the data,

I want the popup to open but it will only be possible to view the data and not edit it.

and I want it like that:

0
Lyuboslav
Telerik team
answered on 24 Oct 2022, 01:32 PM

Hello Ruth,

Thanks for your screenshots.

To disable the inputs in the ORgChart editor form you can use the editorOptions configuration that will allow you to customize the items in the Form that is integrated into the OrgChart. After that, you could set the option "enable" to 'false' as demonstrated below:

form: {
            items: [{
              field: "title",
              label: "Position",
              editor: "DropDownList",
              editorOptions:{
                enable: false
              }
            }]

The above example is summarized in this sample dojo.

Another opinion is to handle the "edit" event, and get the reference to all inputs in the form. Then you can add the "disabled" attributes to the inputs. This is demonstrated in the Dojo linked here

        edit:function(e){
          setTimeout(()=>{
            var form = [...$('*input')];            
            form.forEach(el=>el.disabled = 'disabled');
          },0)
        },

I hope this will help you to reach your goal.

Regards,
Lyuboslav
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Ruth
Top achievements
Rank 1
Iron
Iron
commented on 25 Oct 2022, 07:05 AM

This is exactly what I need,

Thanks for your help!

Tags
OrgChart
Asked by
Ruth
Top achievements
Rank 1
Iron
Iron
Answers by
Lyuboslav
Telerik team
Ruth
Top achievements
Rank 1
Iron
Iron
Share this question
or