Would it be possible to create a maskedtextbox format or even just a 'format' for a regular textbox based on another value?
For example:
We search a green screen or a database for a field on one of the views and return it's adjacent value. Would it be possible for me to take that value and extract all numbers/letters out of it and just be left with blank areas in the value we could use as a 'mask' for future checks so we wouldn't have to get anymore input for that field?
Let's say Balance for example, returns $35.11, I would need to extract all the numbers and have $__.__ as a mask or format for future checks. Is this possible?
3 Replies - 1252 Views - Last Post: 12 May 2014 - 09:58 AM
#1
Create a maskedtextbox format based on a string value?
Posted 09 May 2014 - 02:18 PM
Replies To: Create a maskedtextbox format based on a string value?
#2
Re: Create a maskedtextbox format based on a string value?
Posted 09 May 2014 - 02:25 PM
Sure.. though I am not sure why that would be effective or useful, but sure.
You could easily extend a textbox into a custom user control that has a 'mask' property.. then override the '.text' to take in a value and compare it to the masked format. If they match then pass in your string sans numbers.. if not then pass in what ever the value is.
You could easily extend a textbox into a custom user control that has a 'mask' property.. then override the '.text' to take in a value and compare it to the masked format. If they match then pass in your string sans numbers.. if not then pass in what ever the value is.
#3
Re: Create a maskedtextbox format based on a string value?
Posted 12 May 2014 - 09:50 AM
Would creating a custom control the easiest way to go about this if I'm only going to use the textbox once in the flow?
#4
Re: Create a maskedtextbox format based on a string value?
Posted 12 May 2014 - 09:58 AM
Sure.. though, again, I am not seeing the functionality. If you just want to see if the value changed why not have conditional logic to change the color, put a * next to the field, etc. It seems the way you presented shows LESS information.
Page 1 of 1

New Topic/Question
Reply


MultiQuote





|