Hi Mdesoysa, if you look at the code in the Text_Edit field template Page_Load method:
protected void Page_Load(object sender, EventArgs e)
{
TextBox1.MaxLength = Column.MaxLength;
if (Column.MaxLength < 20)
TextBox1.Columns = Column.MaxLength;
TextBox1.ToolTip = Column.Description;
SetUpValidator(RequiredFieldValidator1);
SetUpValidator(RegularExpressionValidator1);
SetUpValidator(DynamicValidator1);
}You will see the line in BOLD ITALIC if your column size is set to say 10 the text box length will be set to 10 and and so you will not be able to enter more than 10 chars. But as you can see from the code this is turned off after 20 chars so what you could do is:
protected void Page_Load(object sender, EventArgs e)
{
TextBox1.MaxLength = Column.MaxLength;
if (Column.MaxLength < 20)
{
TextBox1.Columns = Column.MaxLength;
}
else
{
TextBox1.Columns = Column.MaxLength;
TextBox1.Width = 150;
}
TextBox1.ToolTip = Column.Description;
SetUpValidator(RequiredFieldValidator1);
SetUpValidator(RegularExpressionValidator1);
SetUpValidator(DynamicValidator1);
} What happens now is the columns property of the textbox is now always set but the width of the textbox is now fixed at over 20 chars.
Steve

Always seeking an elegant solution.
[Oh! If olny I colud tpye!]
c# Bits blogOh, and don't forget to mark as answer any posts that help you
