ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Enable or Disable a Button on page load and on grid row save
Title:
B
I
{code}
?
I have a button in my view: @(Html.Awe().Button().Text("SendAll").OnClick(Html.Awe().OpenPopup("SendAllCounterPopUp"))) I want to check database so when page is loading it has to be enabled or disabled. But also when page rows are changing I need to adapt the change to the button. $('#OpenPrinterItems').on('aweinlinesave', ".awe-row", function (e) { console.log("aweInlineSave"); // enable or disable button }); I don't know how to change the button string on that div tag.
Save Changes
Cancel
c4
asked at 13 Mar 2019
Answers
B
I
{code}
?
for the initial page load you could set @Html.Awe().Button().Id("btn1").Enabled(someBoolCondition)... and to change the enabled state of the button in js you'll have to use jquery, that's why I added `.Id` above: var btn = $('#btn1'); btn.prop('disabled', true); // or false
Save Changes
Cancel
Omu
answered at 13 Mar 2019
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