readonly dropnown in edit mode

1 Answer 76 Views
ComboBox Grid
serge
Top achievements
Rank 2
Bronze
Iron
Iron
serge asked on 21 May 2021, 11:06 AM

I have a Grid with Popup Edit.

In the popup, there is a  required combobox, that should be selected only in Create mode. But in Edit mode, the selected combo value should be readonly. How to implement that logic? 

1 Answer, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 26 May 2021, 05:49 AM

Hi Serge,

If you would like to make the respective ComboBox conditionally editable, I recommend utilizing the Edit event of the grid and changing the state of the ComboBox, namely:

.Events(ev=>ev.Edit("onEdit"))

function onEdit(e){
    if(!e.model.isNew()){
          $("#FieldName").getKendoComboBox().readonly(true);
     }
}

Give this a try and let me know how it works out for you.

 

Regards,
Tsvetomir
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/.

Tags
ComboBox Grid
Asked by
serge
Top achievements
Rank 2
Bronze
Iron
Iron
Answers by
Tsvetomir
Telerik team
Share this question
or