Databases Reference
In-Depth Information
public override Control DataControl
{
get { return this.textBox; }
}
public int Columns { get; set; }
protected void Page_Load(object sender, EventArgs e)
{
this.textBox.ToolTip = this.Column.Description;
if (this.Column.MaxLength < 20)
this.textBox.Columns = this.Column.MaxLength;
this.SetUpValidator(this.requiredFieldValidator);
this.SetUpValidator(this.regularExpressionValidator);
this.SetUpValidator(this.dynamicValidator);
}
protected override void ExtractValues(IOrderedDictionary dictionary)
{
dictionary[this.Column.Name] = this.ConvertEditedValue(this.textBox.Text);
}
protected override void OnDataBinding(EventArgs e)
{
base.OnDataBinding(e);
if (this.Column.MaxLength > 0)
{
this.textBox.MaxLength = Math.Max(
this.FieldValueEditString.Length, this.Column.MaxLength);
}
}
protected override void OnFieldValueChanged(EventArgs e)
{
base.OnFieldValueChanged(e);
this.textBox.Text = this.FieldValueEditString;
}
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.OnFieldValueChanged(e);
}
}
}
Search WWH ::




Custom Search