ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Enabled(false) not working in RadioList
Title:
B
I
{code}
?
I am trying to disable the radio button list in my code @(Html.Awe().AjaxRadioListFor(m => m.ID).ButtonGroup().Action("GetID").Controller("Home").Enabled(false)) But getting error that AjaxRadioList<Model> doesn't contain definition for Enabled ?
Save Changes
Cancel
SalesARM
asked at 21 Feb 2019
are you using the latest version 6 ?
at 21 Feb 2019
Omu
no I am using 4.9 and I will be not be able to change the version. Please provide me with an alternative instead of upgrading the version
at 21 Feb 2019
SalesARM
try this: $('#id').on('aweload', function() { console.log('load'); $(this).parent().find('input[type=radio]').attr('disabled', 'disabled'); } ); you might also want to add a css class and add custom css to make the labels look gray
at 21 Feb 2019
Omu
thanks it worked
at 21 Feb 2019
SalesARM
Now I'm using latest version 6. But now the ButtonGroup is not getting disabled. I'm able to click on buttons. But nothing is happening. In the html I can see that class "awe-disabled" is applied.
at 05 Jan 2020
SalesARM
you'll need to modify `awem.js` to fix this, find `function nbuttonGroup(o, multiple)` and inside it the line that starts with `items += rbtn('awe-btn awe-il` replace with: items += rbtn('awe-btn awe-il ' + selected, econ(item, o), 'data-index="' + index + '" data-val="' + encode(kp(item)) + '"' + disbAttr(o));
at 05 Jan 2020
Omu
it works now, thanks. it will behave normally for simple ajaxRadioList as well ?
at 05 Jan 2020
SalesARM
yes, you can see the behaviour here: https://demo.aspnetawesome.com/Disabled
at 05 Jan 2020
Omu
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK