Hello Dmitry,
I see that you don't understand what I need, so I'll give you a real example of my application.
First there are two properties to add on TDBColumnGridEh, not one
1 - AllowNullValue (True/False)
With this propertie the field value can be null, but when a value is set, the user have only the choice to change the value with the comboBox or input a new value.
In this case VK_DELETE does nothing and an empty string is not valid
2 - AllowNewValue (True/False)
With this property the field can be null too, but the user have only the choice to change the value with the comboBox
In this case TDBColumnGridEh works like a classic comboBox
Example 1 : Input invoice lines My record is like this : lineType, product code, product name, quantity, price, V.A.T ...
The field V.A.T (Value added tax) is required for product line
When the I add a product in the invoice the V.A.T have a value (this value is required in the table product)
The user can change the V.A.T with a comboBox, but in never case can set value to null (even if V.A.T equal 0, in this case V.A.T 0% must exists) and he can't add a new TAX.
In this invoice, I can add differents type of lines as comments by example, and in this case the field V.A.T is null, I use only the product name and the type of line.
With the event OnGetParams I set readOnly to True for such lines on V.A.T and all work fine...
As you can see, I can't set required = True on the field V.A.T
Actually, the user can set Null in this field, but with the property AllowNewValue = False and AllowNullValue = False, no error is possible
Example 2 : Add criteria on productIn this case the user can choose criteria with the comboBox and can add a new element when it doesn't exists in the list.
When a add a new criteria, the field is null, so if the user don't choose a criteria, the record is not posted.
But the user can select an other criteria, but in never case set a null value.
Actually, the user can set Null in this field, but with the property AllowNullValue = False, no error is possible
Hope you are agree with me
Thank you
Best regards
Rico