views:

639

answers:

2

hi i'm using the maskeditexdenter for getting money value ,the problem is when the input is given it takes it from left to right i want it to take it from right to left. the code is

 <asp:TextBox ID="txt_actual_ConveyanceCharges" CssClass="Controls" runat="server"></asp:TextBox>
<ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="txt_actual_ConveyanceCharges" Mask="99,999,999.99" MaskType=Number  InputDirection="RightToLeft"/>
A: 

I have check at my end, this have the both behaviour like, By default when you focus your cursor in textbox, it is starting getting input from right side, but if you put your cursor on left side, then it is accepting input from left side as well

Muhammad Akhtar
A: 

Hai anand Try this,

<ajaxToolkit:MaskedEditExtender runat="server"
TargetControlID="UrTxtBoxID" 
Mask="9,999,999.99"
MessageValidatorTip="true" 
OnFocusCssClass="MaskedEditFocus" 
OnInvalidCssClass="MaskedEditError"
MaskType="Number" 
InputDirection="RightToLeft" 
AcceptNegative="Left" 
DisplayMoney="Left"
/>
Pandiya Chendur
I have checked this.. It is working perfectly...
Pandiya Chendur
since he need to accept input only from right side, his code and your code is same and no problem with her code.
Muhammad Akhtar
@Akthar RightToLeft works for me...
Pandiya Chendur
@Pandiya; but it is accepting input from left side as well
Muhammad Akhtar
hi i checked that code. but now my problem there is the cursor is just placed left to the decimalpoint and when the input is given it takes from leftof decimal point and decimal point values remains empty.for that to enter the decimal value i have to manualy palce the cursor on the decimal value and give the input.MaskedEditExtender is used inside the update panel here.
Anand
@Anand i ll work on that and let you know
Pandiya Chendur
pandiya i'm waiting for that.
Anand
Anand try to set cursor postion on focus for your textbox using javascript.... I think it can be done
Pandiya Chendur
can u give me that jvascript sample code
Anand
Anand i am working with it ... Firefox no prob but in IE some issues are there i ll let you know
Pandiya Chendur
ok i'll wait pandiya
Anand
Anand i tried i didnt find any solution for that... Ok if any comes i ll let u know
Pandiya Chendur
ok thanks for ur intrest in this.so,can u suggest me any other way to allow only numbers and dot(.) in the textbox. in this application i hava more than 100 textboxes
Anand
Anand i ll try to give you answers ..give me five mins...
Pandiya Chendur
Anand Try jquery maskedit and let me know if you get answer
Pandiya Chendur
function numeric_only(e){ var keycode; if (window.event) keycode = window.event.keyCode; else if (event) keycode = event.keyCode; else if (e) keycode = e.which; else return true; //keycodes allowed but not in the beginning - space if(( keycode >= 47 } else { return false; } return true;}<asp:TextBox ID="txt_actual_ConveyanceCharges" runat="server" OnKeyPress="return numeric_only(this);"></asp:TextBox>
Anand
hi pandiya, i used above vode for allowing numbers and dots.
Anand
Ok anand plz let me know if any issues come... R u in tamilnadu?
Pandiya Chendur
ya i'm from chennai tamilnadu
Anand