iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
From the .aspx:
<WebInput runat="Server" ID="txtIndex" Width="75px" AcceptEnter="False" CssClass="spanBlockMiddle25" />
<WebInputDecimalConfigurator FloatScale="4" MaxLength="7" MaxValue="999.9999" MinValue="0" Name="txtIndex" />
From my codebehind – in PreRender:
I am retrieving the UserControl value from the container.
Dim txtIndex As WebInput = ctlForecastMethodMulti.FindControl("txtIndex")
txtIndex.Text = 2.25
The value in is set to 2.25, but after it is assigned txtIndex.Text = 2 and txtIndex.Value = 2.25. (I see this stepping through debug mode)
When the page displays, "2" is displayed in txtIndex.
What is affecting the display value (.Text) and how do I use the configurator to display the correct decimal value?
Are my culture settings automatically handled (if I change numeric to #.###,00 this type of format)?
Yes, updating seems to have solved a number of problems. I have not completed testing for the WebGrid, but I am hopeful.
I am still testing the webgrid, but have encountered the same problem. When calling a custom "InvokeCustomEvent" with the gridId as a parameter, I am seeing the following in the "arguments" list:
"<INPUT style="Z-INDEX: 199; POSITION: absolute; TEXT-ALIGN: right; WIDTH: 83px; HEIGHT: 24px; OVERFLOW: hidden; TOP: 118px; LEFT: 575px" id=grdVariance_TB class=WG5E-ET value=1,4 autocomplete="off" origLeft="575" origTop="118" isDirty="true">"
The value should be "1.4" not "1,4".
I opened a new question for the "^" entry problem. It is here.
Yudi - I have created a new thread here to demonstrate this is still not working as expected.
Please forgive me for lack of understanding about the reported problem, but I assume that the reported problem deals with the value of “Text” and “Value” property of WebInput.
I’d like to suggest using the DisplayFormat and EditFormat feature of WebInput to control how is the WebInput will display its value both in display and edit state. (Display format and edit format can be used together because both of them is used in difference state of WebInput. Edit format is used when WebInput is in edit mode while display format is used when WebInput is not in edit mode.)
Example:
<ISWebInput:WebInput ID="WebInput1" runat="server" Width="75px" AcceptEnter="false" MaxLength="7"> <DisplayFormat Format="$ #,##0.0000" IsEnabled="True" Type="Number"> <ErrorWindowInfo IsEnabled="True"> </ErrorWindowInfo> </DisplayFormat> <EditFormat Format="#,###,##0.0" IsEnabled="True" Type="Number"> <MaskInfo MaskExpression="9,999,990.0" SkipOptional="False"> </MaskInfo> <ErrorWindowInfo IsEnabled="True"> </ErrorWindowInfo> </EditFormat> <CultureInfo CultureName="en-US"> </CultureInfo> <HighLight IsEnabled="True" /> </ISWebInput:WebInput>
Value and Text property
The Value property is responsible for returning and accepting a value with a specific DataType. When a value is assigned to Value property, it will automatically adjust the FormatType and MaskType (when Display Format or Edit Format is enabled) as well as reflecting the Text property.
The Text property represents value that has already been formatted, validated and masked while the Value property represents the value in original DataType with flatten/unmasked format.
I tried to create a simple sample of your reported problem by using the example snippet code. In Page_Load server-side event, the Value property of WebInput is set to “2.25”. And after the page loaded an ASP.NET button and an ASP.NET label is used to obtain the Text property of WebInput.
Everything worked smoothly using my simple sample. The Text property shows “$ 2.2500”.
I enclosed my test sample as attachment. Should you find any steps that I missed during my attempt to reproduce the issue, please feel free to let me know.
Note: the sample uses WebInput.NET 4.0 build 29 and WebUI.NET Framework 3.0 build 773.
Change the configuration to use a different culture.
No mask is used.
I have re-tested the file and changing the configuration by using different culture (from en-US to id-ID). The “2.25” as the WebInput value is now displayed as “225,0000“.
This problem happens because the id-ID culture using dot as thousand separator and comma as the decimal separator. I’d like to suggest editing the mask expression or the format (display format and edit format) to a format that match with the selected culture. You can also try to set the DecimalSeparator property if necessary.
Hope this helps.
That is my problem exactly. We are not using a mask nor do we want to use a mask. I have changed the display format to match the culture (#.###,0000), but it does not work properly.
Please try follow the step-by-step below in order to show “2,25” with comma (“,”) as the decimal separator.
<ISWebInput:WebInput ID="WebInput1" runat="server"> </ISWebInput:WebInput>
<ISWebInput:WebInput ID="WebInput1" runat="server" Width="75px" MaxLength="7"> <CultureInfo CultureName="id-ID"> </CultureInfo> </ISWebInput:WebInput>
<ISWebInput:WebInput ID="WebInput1" runat="server" Width="75px" MaxLength="7" DecimalSeparator=","> <CultureInfo CultureName="id-ID"> </CultureInfo> </ISWebInput:WebInput>
<ISWebInput:WebInput ID="WebInput1" runat="server" Width="75px" MaxLength="7" DecimalSeparator=","> <DisplayFormat Format="#.###,0000" IsEnabled="True" Type="Number"> <ErrorWindowInfo IsEnabled="True"> </ErrorWindowInfo> </DisplayFormat> <CultureInfo CultureName="id-ID"> </CultureInfo> </ISWebInput:WebInput>
protected void Page_Load(object sender, EventArgs e) { WebInput1.Value = "2,25"; }
By using these steps, I’ve managed to show “2,25” in the WebInput.
Entering the value "3,4" in the text box returns a value "34,0000" which is incorrect.If I enter "3.4", the label displays "$ 3,4000" - which is the value I expect to display when entering "3,4".I can get it to display correctly, the edit process is not working as expected.
On a related note, I am having the same problem with the WebGrid when the cell is editable and contains a decimal value.
See the code below (modified from earlier sample)
----------------CodeBehind:public partial class DisplayAndFormatNumericFormat : System.Web.UI.Page{protected void Page_Load(object sender, EventArgs e) {if (! Page.IsPostBack) { WebInput1.Value = "2.25";}}protected void Button1_Click(object sender, EventArgs e) {Label1.Text = WebInput1.Text;}}
ASPX:<form id="form1" runat="server"> <div> <ISWebInput:WebInput ID="WebInput1" runat="server" Width="75px" AcceptEnter="false" MaxLength="7" DecimalSeparator=","> <DisplayFormat Format="$ #,##0.0000" IsEnabled="True" Type="Number"> <ErrorWindowInfo IsEnabled="True"> </ErrorWindowInfo> </DisplayFormat> <EditFormat Format="#,###,##0.0" IsEnabled="True" Type="Number"> <MaskInfo MaskExpression="9,999,990.0" SkipOptional="False"> </MaskInfo> <ErrorWindowInfo IsEnabled="True"> </ErrorWindowInfo> </EditFormat> <CultureInfo CultureName="id-ID"> </CultureInfo> <HighLight IsEnabled="True" /> </ISWebInput:WebInput> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> </div> </form> ------- OR -------<div> <ISWebInput:WebInput ID="WebInput1" runat="server" Width="75px" AcceptEnter="false" MaxLength="7" DecimalSeparator=","> <DisplayFormat Format="$ #.##0,0000" IsEnabled="True" Type="Number"> <ErrorWindowInfo IsEnabled="True"> </ErrorWindowInfo> </DisplayFormat> <EditFormat Format="#.###.##0,0" IsEnabled="True" Type="Number"> <MaskInfo MaskExpression="9.999.990,0" SkipOptional="False"> </MaskInfo> <ErrorWindowInfo IsEnabled="True"> </ErrorWindowInfo> </EditFormat> <CultureInfo CultureName="id-ID"> </CultureInfo> <HighLight IsEnabled="True" /> </ISWebInput:WebInput> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> </div>
The proposed answer (Yudi Member / Posted: September 12, 2011 10:50 PM ) does not handle the different cultures question for entry or display.
Please allow me to summarize what we have so far.
I added three WebInput instances: WebInput1; WebInput2; and WebInput3. WebInput1 has exactly the same code provided in my previous message. The code of WebInput2 and WebInput3 are taken from the snippet code embedded in your last reply.
Following shows the steps during my attempt to reproduce the issue.
WebInput1 shows 3,4000WebInput2 shows $ 0,00000000WebInput3 shows $ 3,4000
I enclosed the sample file and the video that shows the result. Please have the files evaluated and let me know if there are steps that I missed during my experiment.
I'm using WebInput 4 build 29 and WebUI.NET Framework 3 build 771.
I updated my controls and it now works as expected for display and entry. Thank you.
If I change my currency symbol to "^" (our test symbol for currency), I receive the javascript error in the image.
The lower right cut-out is another screen shot that shows the string value ("^") of "vd0c17".
After the update, where do I place the ".js" files to make certain they are being loaded properly. Our process takes the .dll files and moves them to a separate TFS directory and are referenced from there. Where should I put the script files/folders?
I updated my controls and it now works as expected for display and entry. Thank you...
May I assume that the initial reported problem has been resolved now (after applying latest build version of WebInput 4 and WebUI.NET Framework 3)?
...If I change my currency symbol to "^" (our test symbol for currency), I receive the javascript error in the image.The lower right cut-out is another screen shot that shows the string value ("^") of "vd0c17"...
...If I change my currency symbol to "^" (our test symbol for currency), I receive the javascript error in the image.
The lower right cut-out is another screen shot that shows the string value ("^") of "vd0c17"...
It seems that you forgot to enclose the screenshot which shows the JavaScript error as attachment in your previous post.
...After the update, where do I place the ".js" files to make certain they are being loaded properly. Our process takes the .dll files and moves them to a separate TFS directory and are referenced from there. Where should I put the script files/folders?...
It is recommended to obtain and apply hotfix(es) using Intersoft Update Manager. Intersoft Update Manager will establish connection to Intersoft's Web Service by using HTTP protocol. Make sure you have connected to Internet before performing Updates scan. The Update Manager also scans your computer for any valid Components and submits the required information in order to obtain the Updates. You can then choose the updates that you want to download or install it automatically.
To update your products using Update Manager, simply launch Update Manager application from Intersoft program group and click Scan for Updates. Then, select the products to be updated, and finally click on Install button.
When you choose to perform update, Update Manager automatically downloads the update package from Intersoft web server. Upon download completion, Update Manager will update your products intelligently, such as copying scripts and assemblies to required locations, as well as updating the Global Assembly Cache (GAC) – makes product updates more efficient, faster and easier than ever.
However, there are some conditions where you will need to manually apply a hotfix. For examples, you do not have Internet access or it’s a critical hotfix that require special update mechanism. Instructions for manually applying hofixes are available in here.
Glad to hear that the initial reported problem has been resolved after apply latest hotfix of WebInput.
Should you need further assistance or run into any problems regarding our controls, feel free to post it into our forum. We would be happy to assist you again.
Thank you for the information.Please kindly check my reply on your new thread.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname