I have Textboxes in UI as inside a grid . I mean to say many textboxes with the Same IDs
@Html.TextBox("Buyer Charge")
in Source code it appaers as :
<input id="Buyer_Charge" name="Buyer Charge" type="text" value="1.0000" />
Here are my queries
-
I’m firing an event on blur of textbox of id – “Buyer_Charge”. Its firing only for the first row text box. Its not hapening for next rows of textboxes in that grid
-
I want to format the Text value to Currency value in(“$###,###,###,##0.00”)
Pls let me know the soultions for my queries
First of all,
id‘s should be unique in a page. That’s the reason why it only fires on the first one as what you have said.demo
But! If you can’t help it, here’s a little trick.
demo
and to format your
<input>, try masked plugin.