|
Rank: Member Groups: Member
Joined: 4/1/2010 Posts: 18
|
*You'll find a video, of me showing this problem, at the end of this post*I'm using a MaskedEditColumn to host currency values. I need that field type so I can use mask segments. This is the pattern:
Code: HTML/ASPX
<eo:MaskedEditColumn>
<MaskedEdit runat="server">
<eo:MaskedEditSegment Text="€ " />
<eo:MaskedEditSegment SegmentType="Mask" Mask="-000000" />
<eo:MaskedEditSegment Text="," />
<eo:MaskedEditSegment SegmentType="Mask" Mask="00" />
</MaskedEdit>
</eo:MaskedEditColumn>
Unfortunately a big problem occurs when I run this grid. Occasionally when I enter edit mode on this cell, the value changes by itself copying from the previous cell. This is a really simple asp page to prove the concept -tried with both versions 7 and 8.
Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GridSimple._Default" %>
<%@ Register TagPrefix="eo" Namespace="EO.Web" Assembly="EO.Web" %>
<!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></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<eo:Grid ID="Grid" runat="server" Height="100px" Width="500px"
IsCallbackByMe="False" FullRowMode="False" AllowNewItem="true">
<Columns>
<eo:TextBoxColumn Width="100" HeaderText="Item" />
<eo:MaskedEditColumn Width="150" HeaderText="Price">
<MaskedEdit runat="server" Width="150">
<eo:MaskedEditSegment Text="€ " />
<eo:MaskedEditSegment SegmentType="Mask" Mask="-000000" />
<eo:MaskedEditSegment Text="," />
<eo:MaskedEditSegment SegmentType="Mask" Mask="00" />
</MaskedEdit>
</eo:MaskedEditColumn>
</Columns>
</eo:Grid>
</div>
</form>
</body>
</html>
Code: C#
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
namespace GridSimple {
public partial class _Default : System.Web.UI.Page {
protected void Page_Load(object sender, EventArgs e){
Grid.DataSource = new object[]{
new object[]{"item1","€ 555555,11"},
new object[]{"item2","€ 123456,21"},
};
Grid.DataBind();
}
}
}
Start the application, click on the Price cell of the first item and edit the value of the first segment, now click on the Price cell of the second item and you should see the value changing by itself. I didn't use any special handler, just a regular MaskedEditColumn...so why does it happen? Can you experience my same problem? Have I done something wrong? I loaded a video on youtube, of me running this demo and showing the problem. You can find it here.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We have confirmed this to be a bug and will post an update build for you as soon as possible.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We have posted a new build that should address this issue. Please see your private message for download location.
Please note that you may also want to change your mask from "000000" to "999999". If you use the "0" mask, then it will not match "___123" because "0" always requires a digit.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 4/1/2010 Posts: 18
|
I'm trying it now, it seems to work, your suggestion about the mask was very useful too. Thanks.
|
|