Disable a Select2 control programmatically (from xyzDialog)
See original GitHub issueDear @volkanceylan, I’m trying to disable a Select2 control from the parent (I mean container) dialog, but with no luck. The same operation on a toolbar button was easy instead:
toolbar.FindButton("xyz-button").Hide();
but if I get a reference to the LookupEditor with the syntax form.MyLookupEditor then I cannot modify the enabled/disabled propery.
I also tried to get the control with the form.ById() syntax and then adding a readonly class, but once again it remain enabled…what I’m doing wrong?
Thanks for you support Regards
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
How to disable options in select2 - jquery
you can reinitialize select after disabling it use following code $("select").select2("destroy").select2();. something like
Read more >Appearance | Select2 - The jQuery replacement for select ...
Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and pagination (infinite scrolling) of results.
Read more >How to prevent two option value from being selected at the ...
I have one select2 element which has ajax data source. In my program I happen to set the value of one select2 element...
Read more >Events | Select2 - The jQuery replacement for select boxes
You can manually trigger events on a Select2 control using the jQuery trigger method. However, if you want to pass some data to...
Read more >Options | Select2 - The jQuery replacement for select boxes
Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and pagination (infinite scrolling) of results.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

EditorUtils.SetReadOnly(form.MyField, true)
Ahh, I had to rerun the T4 templates, the ts was out of date. Working now.