ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Triggering onChange on click of spinner in grid row textbox
Title:
B
I
{code}
?
I am giving a textbox in grid column for numeric field. The onchange event is triggering when I change spinner and then click on outside but I wanted to trigger onchange event for the textbox when the spinner is clicked and value is changed in textbox without the need of clicking outside to trigger onchange event on textbox. This is the code of view file: var textBoxQuantity = Html.Awe().TextBox("Quantity").Prefix(".(Id)") .Numeric(o => o.Min(1.0)).Value(".(Quantity)") .HtmlAttributes(new { onchange = "onQtyChange(event)" }) .CssClass("w-100") .ToString(); @(Html.Awe().Grid("TestGrid") .Url(Url.Action("GridGetItems", "Test")) .ShowGroupBar(false) .Mod(o => o.Main().Loading().MovableRows()) .Columns( new Column { ClientFormat = ".Id", Name="Id",Width = 80, Resizable = false, Hidden=true}, new Column { Bind="Quantity",Width=95, Header="Qty" , ClientFormat= textBoxQuantity }))
Save Changes
Cancel
Sam Mosaic
asked at 20 Nov 2023
which version are you using, `change` is triggered when clicking the spin buttons in v. 7.7
at 20 Nov 2023
Omu
I am using version 6.*.
at 20 Nov 2023
Sam Mosaic
Answers
B
I
{code}
?
Ideally you would update to the latest version, you can try this workaround js script for now: $(document).on('mouseup', '.awe-spinbtn', function(){ $(this).closest('.awe-field').find('.awe-val').change(); console.log($(this).closest('.awe-field').find('.awe-val').val()); });
Save Changes
Cancel
Omu
answered at 20 Nov 2023
Thanks it worked for me.
at 20 Nov 2023
Sam Mosaic
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