You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.3 KiB

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Collections.Specialized;
  6. using System.Linq;
  7. using System.Web;
  8. using System.Web.Security;
  9. using System.Web.UI;
  10. using System.Web.UI.WebControls;
  11. using System.Web.UI.WebControls.WebParts;
  12. using System.Web.UI.HtmlControls;
  13. using System.Xml.Linq;
  14. using System.Web.DynamicData;
  15. namespace Swift.web.DynamicData.FieldTemplates
  16. {
  17. public partial class SwiftTextBoxCombo_EditField : System.Web.DynamicData.FieldTemplateUserControl
  18. {
  19. protected void Page_Load(object sender, EventArgs e)
  20. {
  21. TextBox1.MaxLength = Column.MaxLength;
  22. if (Column.MaxLength < 20)
  23. TextBox1.Columns = Column.MaxLength;
  24. TextBox1.ToolTip = Column.Description;
  25. SetUpValidator(RequiredFieldValidator1);
  26. SetUpValidator(RegularExpressionValidator1);
  27. SetUpValidator(DynamicValidator1);
  28. }
  29. protected override void ExtractValues(IOrderedDictionary dictionary)
  30. {
  31. dictionary[Column.Name] = ConvertEditedValue(TextBox1.Text);
  32. }
  33. public override Control DataControl
  34. {
  35. get
  36. {
  37. return TextBox1;
  38. }
  39. }
  40. }
  41. }