I am currently developing a software to integrate and be a nice front end UI to a database that doesn't have a front end UI. Part of this UI has a spot where there is a listbox on the left and on the right will be multiple sections of a drop down box on the left and a "textbox" on the right with an "and" and "or" radio button below it. It looks similar to the following linked picture.
So with that being said, one of the things I want to do is based on the column that is chosen on the left, the "textbox" will restrict/force reformat the data entered accordingly. So if it is a column of datetime formatting, then the textbox will only allow that kind of input. If the restriction is int[x], then the only input will be no more than the limitation of the integer, etc. etc. but not allow any letters to be inputted.
So this is where the real struggle comes in. I am struggling to figure out how to only allow specific input to the box based on the column chosen. Do I leave it as a text box and then use conditional statements that restrict the data input based on the formatting of the column? (Which this is how I am planning on currently programming it. However, this requires a lot of conditions and making sure to try and handle any and all possibilities out there.) Or is there a better way to handle the different types of SQL Server data types that will potentially be present? As in I create a box with the appropriate input restrictions and somehow dynamically swap them in/out based on the column selected at the time.
The biggest one that makes me question is the datetime formatting. I would love to use a date picker box (make sure I make it as idiot proof as I can). However, I am not sure if there would be an easy way to switch between a date picker box and any other boxes that could be necessary to have and have it all be seamless.
NOTE: All of the data will be stored so that if you go back to a column you already input data for, it will pull it back up.
Grateful for all of the feedback and input.