Automated text length limit with UXTextBox and DevForce

3 replies. Last post: August 15, 2012 10:00 PM by Yudi
Tags :
  • New Discussion
  • New Question
  • New Product Feedback
haraldMember

We are using Intersoft UI in combination with the DevForce entity framwork.

We are trying to find an easy to use solution for the following everyday problem:


We use UXTextBoxes to receive text input. We need an easy way to set the MaxLength property according to the maximum length of the binding entity field (from DevForce entity framework) the UXTextBox is bound to.

We have come up with two possible solutions:

1. write a value converter that receives as input the property in question and (using reflection) returns the maximum length of the text field. This converter can then be used in the binding to the MaxLength property.


2. Derive our own TextBox class from UXTextBox and set the MaxLength property automatically and dependent on the binding in the code of the class.


Both are possible solutions, but given the fact that those are everyday problems for any DB UI developer we are hoping that you have a much simpler, i.e. less verbose and labor intensive solution.

Thanks.


All times are GMT -5. The time now is 11:38 AM.
Previous Next