|
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
|
|
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!
|
|
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.
|
|
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!
|
|
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.
|
|
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!
|
|
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
|
|
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.
|
|