Welcome Guest Search | Active Topics | Sign In | Register

Populatin Text in Masked Edit Control Options
Gary Michalek
Posted: Saturday, September 17, 2011 4:31:58 PM
Rank: Advanced Member
Groups: Member

Joined: 12/5/2007
Posts: 57
Hi,

On my form load event I am setting the Masked edit controls mask property as follows:

AppSin.Mask = "000-000-000"

As I want to edit and display the data as a Canadian Social Insureance number which is formatted like 123-456-789. I have also other masked edits I want to use for phone numbers etc. Though it seems to work fine for entering data I cannot populate the control with data and have it display anything.

I hae tried inclusding the mask characters i.e. 123-456-789 as well as without ie. 123456789. Am I doing somethong wrong, missing a property setting or is the control not meant for this purpose?

Thanks,

Gary
eo_support
Posted: Monday, September 19, 2011 8:17:36 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We tried the following code in Page_Load and it works fine. Can you try it?

MaskedEdit1.Mask = "000-000-0000";
MaskedEdit1.Text = "123-456-789";

Thanks!
Gary Michalek
Posted: Monday, September 19, 2011 9:06:28 AM
Rank: Advanced Member
Groups: Member

Joined: 12/5/2007
Posts: 57
Hi,

I tried it and when I do this in the Page_Load event it works. However when I try it in the procedure that populates the controls with data from the database it dies not and that is even hardcoding a literal value into it.
eo_support
Posted: Monday, September 19, 2011 9:13:33 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

In that case please try to create a test page that demonstrates the problem. Once we have that we will be happy to take a look.

Thanks!
Gary Michalek
Posted: Tuesday, September 20, 2011 8:32:22 AM
Rank: Advanced Member
Groups: Member

Joined: 12/5/2007
Posts: 57
Just an FYI. I emailed the regular support email address with a sample project that demonstrates the bug.
eo_support
Posted: Tuesday, September 20, 2011 8:40:44 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Thanks for the update. Yes. We do have it. Will get back to you as soon as we find anything!
eo_support
Posted: Tuesday, September 20, 2011 5:29:31 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We looked into your test code. The problem occurs because your Page_Load is called after Show. While you set the MaskedEdit's Text inside Show, you would set the MaskedEdit's Mask property again in Page_Load, which would wipe out the MaskedEdit's content.

Thanks
Gary Michalek
Posted: Thursday, September 22, 2011 9:57:49 PM
Rank: Advanced Member
Groups: Member

Joined: 12/5/2007
Posts: 57
Hi,

Thanks and my apologies. I actually got arround it by setting the property in design mode.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.