>I want to use inputmask in a combobox with inputmask '9-99-999-99999', and also want to restrict user to enter the data using same inputmask.
>
>cb1.format = "ZKR"
>cb1.inputmask= "9-99-999-99999"
>
>What I get from setting these properties. When user enters the data it is OK. But the data in list is not changed by inputmask.
As it should not be. Inputmask applies to the textbox part of the combo. If you want all of it to show transformed...
>Now what I did to solve this problem I used transform() in the SELECT statement to show data in required inputmask.
>It changed the data, but when user enters the data in combobox it shows the additional "-" due to "-" presence in data.
>How would I acheive the solution?
...you'd then get it transformed twice when selected. The only way out of this that I see is to fill the combo with transformed data (i.e. with dashes inserted) and when saving into a table have it transformed back (with dashes removed).
The "R" in the format means that it would display but not store the formatting. And the dropdown part shows them as they are to be stored.
You may try to have two columns in the combo - the visible one with formatted strings, and the invisible one (this.columwidths=transform(this.width)+",0") with unformatted, bound to second column.