StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Invalid Input in Browse DialogExpand / Collapse
Author
Message
Posted 06/05/2008 1:52:22 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 3:36:53 PM
Posts: 427, Visits: 1,714
I have a sales order window with the standard, run-of-the-mill browse dialog.  It works fine.  The first search field in the search list is the Order ID.  This is an integer field.  The browse dialog presents a textbox control for the user to enter an Order ID.  If a user enters anything other than numeric characters (0-9), then the system generates two (2) identical exceptions: "Input string was not in a correct format."  This is quite frustrating for a number (pardon the pun) of reasons: 1)  The user gets slapped with a error handling event which shouldn't even be happening; 2)  I am being sent two trouble tickets for each single event that occurs.  3)  The application (not StrataFrame...I am positive that I am doing something wrong) looks like it cannot even handle simple data conversions at a very basic level.

What do I do to solve this problem?

Thanks,
Bill

Post #16863
Posted 06/05/2008 2:19:35 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 3:36:53 PM
Posts: 427, Visits: 1,714
Is the answer the "field mask?"

If so, what mask would I use?  I currently have a 5 digit Order ID.  If I make the mask #####, then as soon as the ID hits six digits, I will have to rollout and update.  What mask will work here?

Or, is there another way?

Thanks,
Bill

Post #16865
Posted 06/06/2008 8:37:03 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 8:51:57 AM
Posts: 4,559, Visits: 4,544
Yes, you will want to use a mask.  That is why it is avaialble on a search field item.  You can refer to the standard .NET help docs on this one as it is just a standard SF Masked Text box which inherits from a System.Windows.Forms.MaskedTextBox.  You could also drop one on a form and play with the masked settings until you get what you want and then apply that to your search field.  But more than likely you will want to supply:

00000
 

as the mask.

Post #16880
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 8:58am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.125. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.