Making a lookup selector field read only

Posted by IramK on 08-Apr-2016 09:09

Hello,

Just like any other field, I was trying to use the new kendo config way of making the lookup selector field readonly. This function does make the input field on the lookup field readonly, however a user can still click on the selector magnifying icon. This function works perfectly fine on other fields but not the lookup selector.

Suggestion: Currently there is no client-side function that allows us to set a field as read-only and it would be a good idea to have this function available to us as given below. There is an rbf_setFieldDisabled() function but it does not help when we try to save a form where we want to retain some values on save.

Also the way I think this read-only field could look for a lookup field is how you currently have it in the system when someone goes and selects the "Read only" option from the design of the page. Just in this case we dynamically have the option of setting this lookup field to read-only using a function. Let me know what you think.

Suggested Function: 

rbf_setFieldReadOnly('integrationName');

Code:

rbf_getFieldContext("R12345").getKendoConfig().readonly();



Posted by IramK on 21-Apr-2016 04:42

Hello Karthikeyan,

I have already posted the idea in the ideas section. Please have a look at the link below:

community.progress.com/.../making_a_lookup_selector_field_read_only

I did not get a chance to try out your solution. I shall give it a go and get back to you.

Cheers.

Iram

All Replies

Posted by Karthikeyan Bhaskaran on 20-Apr-2016 04:39

Hi Iram, I checked and can confirm that I see the same behavior. By adding one more line of jQuery to disable the lookup icon, I was able to make it unclickable, even if still visible. Hope this is an acceptable solution. You may also log an Idea to make a dynamically changeable readonly flag, and not just from the Design page. Regards, Karthikeyan

Posted by Karthikeyan Bhaskaran on 21-Apr-2016 01:34

Hello Iram,

For now, does the suggestion to use jQuery to disable the lookoup button help?

While the better / valid solution for controls such as lookup fields is to make use of getPageContext(...).enable(false), this functions the same way as a regular "disable" - field value not persisted on submit. This is expected.

So, your request for a readonly (where the values actually are persisted) is desirable. Please do log an Idea.

-Karthikeyan

Posted by IramK on 21-Apr-2016 04:42

Hello Karthikeyan,

I have already posted the idea in the ideas section. Please have a look at the link below:

community.progress.com/.../making_a_lookup_selector_field_read_only

I did not get a chance to try out your solution. I shall give it a go and get back to you.

Cheers.

Iram

This thread is closed