|
Rank: Advanced Member Groups: Member
Joined: 9/2/2010 Posts: 120
|
Hi, How can I show a number with thousand separator in a MaskedEdit object? I did the code below to demonstrate my problem.
Code: HTML/ASPX
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="MaskedTest.aspx.vb" Inherits="_2011Test.MaskedTest" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<eo:MaskedEdit ID="MaskedEdit1" runat="server"><eo:MaskedEditSegment SegmentType="Number" Mask="###,##0"></eo:MaskedEditSegment>
</eo:MaskedEdit><br />
<br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> </div>
</form>
</body>
</html>
But, when I leave the "MaskedEdit1" control, its number is shown without thousand separator like below: What am I doing wrong? Another question. When I focus on the "MaskedEdit1", all digits are selected. How do I edit only one digit? Thanks in advance, Camarate
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You can't use Type="Number" and Mask="###,##0" at the same time. Mask only works when Type="Mask". So you must set Type="Mask".
There is no way for you to just one digit in MaskedEdit. It always selects all digits.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 9/2/2010 Posts: 120
|
Hi eo_support, Thanks for your reply. But if I set the field type to "Mask" as your suggestion, the field alignment is on the left (as shown below), losing the characteristic of a numeric content. How do I make the correct alignment? Finally, just as suggestion, think about the possibility to selection of a few digits. That would be very helpful when the field contents is too large, preventing that the user is required to retype all of it. Regards, Camarate
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Thanks for the suggestion. There is no way to right align a masked number. If you do need right align, the closest you can have is a Type="Number" segment. A number segment will automatically use the correct decimal point based on your location (for example, use "," instead of "." for some languages), but it will not automatically add thousands separator.
Thanks
|
|