It would be great if the form configuration allowed for items to be readonly or disabled during setup. There are times when perhaps some data should not be able to be changed.
I'm having to do tricks such as this for each field I want readonly.
$("#fileSize").data("kendoNumericTextBox").readonly(true);
$("#originalFilename, #title").kendoTextBox({ readonly: true });
Hello James,
Thank you for your feedback.
As the requested functionality can be achieved through the specified approach, I would suggest utilizing it for marking specific editors as readonly. Also, adding an option to the items configuration will be ambiguous with the readonly editor option. Taking this into consideration, I will mark this request as "Declined".
Regards,
Dimitar
Progress Telerik
Hello Dimitar,
I can imagine times when it might be useful to set the readonly flag of a field based on a property in the data as you suggest. I guess it is already possible using some custom code though.
James
Hello James,
When using one of the built-in editors of the Form the widget can be marked as readonly through the editorOptions option:
{
field: "ProductID",
editor: "ComboBox",
editorOptions: {
....
readonly: true
}
}
In cases where custom markup needs to be used, then the attribute can be added through a custom editor as you have demonstrated.
Do you consider the above mentioned approach useful, or would you rather configure this through the items configuration (e.g item.readonly) ?
Regards,
Dimitar
Progress Telerik
As a workaround I have used a function.
editor: textboxInput, editorOptions: { readonly: true }
function textboxInput(container, item) {