1

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"/>
Muhammad Akhtar
  • 51,913
  • 37
  • 138
  • 191
Anand
  • 15
  • 2
  • 7

1 Answers1

1

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"
/>
ACP
  • 34,682
  • 100
  • 231
  • 371
  • 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 Dec 08 '09 at 07:34
  • 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 Dec 08 '09 at 07:47
  • pandiya i'm waiting for that. – Anand Dec 08 '09 at 07:51
  • Anand try to set cursor postion on focus for your textbox using javascript.... I think it can be done – ACP Dec 08 '09 at 08:21
  • Anand i am working with it ... Firefox no prob but in IE some issues are there i ll let you know – ACP Dec 08 '09 at 08:28
  • Anand i tried i didnt find any solution for that... Ok if any comes i ll let u know – ACP Dec 08 '09 at 09:24
  • 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 Dec 08 '09 at 09:36
  • 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 && keycode <= 57 ) || (keycode==46 || keycode==13)) //ASCII CODE 46=. //13=ENTER { return true; } else { return false; } return true; } – Anand Dec 08 '09 at 10:37
  • hi pandiya, i used above vode for allowing numbers and dots. – Anand Dec 08 '09 at 10:37
  • Ok anand plz let me know if any issues come... R u in tamilnadu? – ACP Dec 08 '09 at 11:02
  • ya i'm from chennai tamilnadu – Anand Dec 08 '09 at 11:51