How to set select tag as disabled or readonly in jquerymobile?
http://jquerymobile.com/demos/1.0a4.1/docs/forms/forms-selects.html
see if this method helps
disable
disable a select.
$('select').selectmenu('disable');
Related
I have a dxCheckGroupBox with 5 cxRadioButtons inside.
Check box of the dxCheckGroupBox toggles it's state (cbaToggleChildrenEnabledState) from enabled to disabled.
How can I disable certain cxRadioButtons inside dxCheckGroupBox so they stay
disabled when I click the dxCheckGroupBox's check box ?
I tried disabling the buttons by code in the OnFormShow event but it does not work.
As soon as I click dxCheckGroupBox's check box they all get enabled.
Set the CheckAction property of the dxCheckGroupBox;
dxCheckGroupBox1.CheckBox.CheckAction := cbaNone;
You'll be able to disable/enable controls.
I have an issue where I need to hide or remove options from a select2 dropdown when selected. These selections fill a list. I would rather not remove the option because if the user removes it from the freshly populated list then it should return to the dropdown with its place in the order restored. I've tried the following:
.select2-results .select2-disabled, .select2-results__option[aria-disabled=true] {
display: none;
}
$('#optionId').prop('disabled', true);
With the prop being set in the jQuery change block. I just can't get this piece.
I have figured it out. If the disable is wrapped like so:
$(#selectId).select2('destroy');
$(#optionId).prop('disabled', true);
$(#selectId).select2();
then the disabled setting will be honored by select2 and the the display none will make the item disappear. To make it reappear, just follow the same steps with the disabled property set to 'false'.
Is it possible to hide the checkbox column on the left when enabling multiSelect? I would just like to enable the multiSelect via Ctrl, I don't need the checkboxes.
Thanks!
Yes, Set the enableRowHeaderSelection: false in your grid options.
This will hide the check boxes for you.
How can I do that;
Click Enter in TextBoxes for Runnig Button in Winrt?
I remember that textbox's AcceptReturn property doing it but for doing it we were changing forms' AcceptButton property in System.Forms but there is no property named AcceptButton.
Thank you.
I don't think there is one property out of the box, but I will probably add an attached property or two to the WinRT XAML Toolkit to add that feature. For now you can either do the same thing - implement an attached property that will do it for you or simply listen for key events on the form manually and handle the Enter key the same way you handle the button.
I have a JQuery Button, disabled by default and I need to enable it on certain event.
My problem is that when I just simply remove the attribute 'disabled' the button maintains the disabled jquery css styles.
I removed them by hand:
$('[id$=btnDowloadXLS]').removeAttr("disabled").removeClass("ui-state-disabled").removeClass("ui-button-disabled");
But, then the button is not the same as an active button, onMouseDown it doesn't take the proper style.
I figured out this solution
$('[id$=btnDowloadXLS]').button({ disabled: false });
which I think creates again the JQuery button.
My question is: is there a cleaner, proper way to re-enable a button and that the button gets the proper/by-default enabled styles?
jQuery UI buttons have enable and disable methods that you can call to enable or disable the button:
$("#mybutton").button("enable"); // or .button("disable");
Check the Methods tab of the documentation:
.button("enable");
If you want to toggle it using a Boolean (e.g. enabled), this should also work (documentation):
.button("option", "disabled", !enabled);