protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.DataKeyNames = new string[] { "ProductID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; SuperForm1.ItemInserted += SuperForm1_ItemInserted; SuperForm1.ItemCommand += SuperForm1_ItemCommand; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "ProductID"; field1.HeaderText = "Product ID"; field1.ReadOnly = true; field1.InsertVisible = false; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ProductName"; field2.HeaderText = "Product Name"; field2.Required = true; FilteredTextBoxExtender FilteredTextBoxExtender1 = new FilteredTextBoxExtender(); FilteredTextBoxExtender1.ID = "FilteredTextBoxExtender1"; FilteredTextBoxExtender1.FilterType = FilterTypes.LowercaseLetters | FilterTypes.UppercaseLetters | FilterTypes.Custom; FilteredTextBoxExtender1.ValidChars = " "; field2.Filters.Add(FilteredTextBoxExtender1); Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "UnitsInStock"; field3.HeaderText = "Units In Stock"; FilteredTextBoxExtender FilteredTextBoxExtender2 = new FilteredTextBoxExtender(); FilteredTextBoxExtender2.ID = "FilteredTextBoxExtender2"; FilteredTextBoxExtender2.FilterType = FilterTypes.Numbers; FilteredTextBoxExtender2.ValidChars = " "; field3.Filters.Add(FilteredTextBoxExtender2); Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "UnitsOnOrder"; field4.HeaderText = "Units On Order"; FilteredTextBoxExtender FilteredTextBoxExtender3 = new FilteredTextBoxExtender(); FilteredTextBoxExtender3.ID = "FilteredTextBoxExtender3"; FilteredTextBoxExtender3.FilterType = FilterTypes.Numbers; field4.Filters.Add(FilteredTextBoxExtender3); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.AllowPaging = true; SuperForm1.AutoGenerateDateFields = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "OrderID"; field1.HeaderText = "Order ID"; field1.ReadOnly = true; field1.InsertVisible = false; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ShipName"; field2.HeaderText = "Ship Name"; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "ShipCity"; field3.HeaderText = "Ship City"; Obout.SuperForm.DropDownListField field4 = new Obout.SuperForm.DropDownListField(); field4.DataField = "ShipCountry"; field4.DisplayField = "ShipCountry"; field4.HeaderText = "Country"; field4.DataSourceID = "SqlDataSource2"; Obout.SuperForm.DateField field5 = new Obout.SuperForm.DateField(); field5.DataField = "OrderDate"; field5.HeaderText = "OrderDate"; field5.DataFormatString = "{0:MM/dd/yyyy}"; field5.ApplyFormatInEditMode = true; Obout.SuperForm.MultiLineField field6 = new Obout.SuperForm.MultiLineField(); field6.DataField = "AdditionalInformation"; field6.HeaderText = "Details"; SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1Container.Controls.Add(SuperForm1); if (!IsPostBack) { ConfigureWidths(); } }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Registration Form"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = false; SuperForm1.AutoGenerateEditButton = false; SuperForm1.AutoGenerateDeleteButton = false; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.AllowPaging = false; SuperForm1.ItemInserting += SuperForm1_Inserting; SuperForm1.DefaultMode = DetailsViewMode.Insert; CompareValidator compareEmail = new CompareValidator(); compareEmail.ID = "CompareValidator1"; compareEmail.ValidationGroup = "Group1"; compareEmail.ControlToCompare = "SuperForm1_EmailAddress"; compareEmail.ErrorMessage = "*"; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "EmailAddress"; field1.HeaderText = "E-mail Address"; field1.Required = true; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ConfirmEmailAddress"; field2.HeaderText = "Confirm E-mail"; field2.Required = true; field2.Validators.Add(compareEmail); Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "FirstName"; field3.HeaderText = "First Name"; field3.Required = true; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "LastName"; field4.HeaderText = "Last Name"; field4.Required = true; Obout.SuperForm.CommandField field5 = new Obout.SuperForm.CommandField(); field5.ShowInsertButton = true; field5.ShowCancelButton = false; field5.ButtonType = ButtonType.Button; field5.ItemStyle.HorizontalAlign = HorizontalAlign.Center; field5.HeaderText = "OrderDate"; SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.Title = "Order Details"; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; SuperForm1.AllowDataKeysInsert = false; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "OrderID"; field1.HeaderText = "Order ID"; field1.ReadOnly = true; field1.InsertVisible = false; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ShipName"; field2.HeaderText = "Ship Name"; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.HeaderText = "Ship City"; field3.DataField = "ShipCity"; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "ShipRegion"; field4.HeaderText = "Ship Region"; Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField(); field5.DataField = "ShipCountry"; field5.HeaderText = "Ship Country"; Obout.SuperForm.BoundField field6 = new Obout.SuperForm.BoundField(); field6.DataField = "ShipPostalCode"; field6.HeaderText = "Ship Postal Code"; Obout.SuperForm.DateField field7 = new Obout.SuperForm.DateField(); field7.DataField = "OrderDate"; field7.HeaderText = "Order Date"; field7.DataFormatString = "{0:MM/dd/yyyy}"; field7.ApplyFormatInEditMode = true; SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1.Fields.Add(field7); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title="Registration Form"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = false; SuperForm1.AutoGenerateEditButton = false; SuperForm1.AutoGenerateDeleteButton = false; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.AllowPaging = false; SuperForm1.ItemInserting += SuperForm1_Inserting; SuperForm1.DefaultMode = DetailsViewMode.Insert; CompareValidator compareEmail = new CompareValidator(); compareEmail.ID="CompareValidator1"; compareEmail.ValidationGroup="Group1"; compareEmail.ControlToCompare="SuperForm1_EmailAddress"; compareEmail.ErrorMessage="*"; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "EmailAddress"; field1.HeaderText = "E-mail Address"; field1.Required = true; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ConfirmEmailAddress"; field2.HeaderText = "Confirm E-mail"; field2.Required = true; field2.Validators.Add(compareEmail); Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "FirstName"; field3.HeaderText = "First Name"; field3.Required = true; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "LastName"; field4.HeaderText = "Last Name"; field4.Required = true; Obout.SuperForm.CommandField field5 = new Obout.SuperForm.CommandField(); field5.ShowInsertButton = true; field5.ShowCancelButton = false; field5.ButtonType = ButtonType.Button; field5.ItemStyle.HorizontalAlign = HorizontalAlign.Center; field5.HeaderText = "OrderDate"; SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Order Details"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; SuperForm1.AllowDataKeysInsert = false; SuperForm1.EnableModelValidation = true; SuperForm1.DataBound += SuperForm1_DataBound; Obout.SuperForm.BoundField field11 = new Obout.SuperForm.BoundField(); field11.DataField = "OrderID"; field11.HeaderText = "Order ID"; field11.ReadOnly = true; field11.InsertVisible = false; Obout.SuperForm.BoundField field12 = new Obout.SuperForm.BoundField(); field12.DataField = "ShipName"; field12.HeaderText = "Ship Name"; Obout.SuperForm.DateField field13 = new Obout.SuperForm.DateField(); field13.DataField = "OrderDate"; field13.HeaderText = "Order Date"; field13.DataFormatString = "{0:MM/dd/yyyy hh:mm}"; field13.ApplyFormatInEditMode = true; Obout.SuperForm.DateField field14 = new Obout.SuperForm.DateField(); field14.DataField = "ShippedDate"; field14.HeaderText = "Shipped Date"; field14.DataFormatString = "{0:MM/dd/yyyy hh:mm}"; field14.ApplyFormatInEditMode = true; Obout.SuperForm.DateField field15 = new Obout.SuperForm.DateField(); field15.DataField = "RequiredDate"; field15.HeaderText = "Required Date"; field15.DataFormatString = "{0:MM/dd/yyyy hh:mm}"; field15.ApplyFormatInEditMode = true; SuperForm1.Fields.Add(field11); SuperForm1.Fields.Add(field12); SuperForm1.Fields.Add(field13); SuperForm1.Fields.Add(field14); SuperForm1.Fields.Add(field15); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Order Details"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.AutoGenerateDateFields = true; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; SuperForm1.ItemUpdating += SuperForm1_ItemUpdating; SuperForm1.ItemInserting += SuperForm1_ItemInserting; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "OrderID"; field1.HeaderText = "Order ID"; field1.ReadOnly = true; field1.InsertVisible = false; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ShipName"; field2.HeaderText = "Ship Name"; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "ShipCity"; field3.HeaderText = "Ship City"; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "ShipRegion"; field4.HeaderText = "Ship Region"; Obout.SuperForm.TemplateField field5 = new Obout.SuperForm.TemplateField(); field5.HeaderText = "Ship Country"; field5.ItemTemplate = new ShipCountryItemTemplate(); field5.EditItemTemplate = new ShipCountryEditItemTemplate(); Obout.SuperForm.TemplateField field6 = new Obout.SuperForm.TemplateField(); field6.HeaderText = "Sent"; field6.ItemTemplate = new SentItemTemplate(); field6.EditItemTemplate = new SentEditItemTemplate(); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Order Details"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Insert; SuperForm1.AllowDataKeysInsert = false; SuperForm1.EnableModelValidation = true; SuperForm1.DataBound += SuperForm1_DataBound; RequiredFieldValidator RequiredFieldValidator1 = new RequiredFieldValidator(); RequiredFieldValidator1.ID = "RequiredFieldValidator1"; RequiredFieldValidator1.ErrorMessage = "*"; RequiredFieldValidator1.InitialValue = "Select a customer ..."; RequiredFieldValidator RequiredFieldValidator2 = new RequiredFieldValidator(); RequiredFieldValidator2.ID = "RequiredFieldValidator2"; RequiredFieldValidator2.ErrorMessage = "*"; RequiredFieldValidator2.InitialValue = "Select a country ..."; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "OrderID"; field1.HeaderText = "OrderID"; field1.ReadOnly = true; field1.InsertVisible = false; Obout.SuperForm.DropDownListField field2 = new Obout.SuperForm.DropDownListField(); field2.DataField = "CustomerID"; field2.DisplayField = "CompanyName"; field2.HeaderText = "Customer"; field2.DataSourceID = "SqlDataSource3"; field2.Validators.Add(RequiredFieldValidator1); Obout.SuperForm.DropDownListField field3 = new Obout.SuperForm.DropDownListField(); field3.DataField = "ShipCountry"; field3.HeaderText = "Country"; field3.DisplayField = "ShipCountry"; field3.DataSourceID = "SqlDataSource2"; field3.Validators.Add(RequiredFieldValidator2); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.AutoGenerateRows = false; SuperForm1.DefaultMode = DetailsViewMode.Insert; SuperForm1.ItemInserting += SuperForm1_Inserting; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "FirstName"; field1.HeaderText = "First Name"; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "LastName"; field2.HeaderText = "Last Name"; Obout.SuperForm.DropDownListField field3 = new Obout.SuperForm.DropDownListField(); field3.DataField = "CountryID"; field3.HeaderText = "Country"; field3.Required = true; field3.DataSourceID = "CountriesDataSource"; field3.DataValueField = "CountryID"; field3.DataTextField = "CountryName"; field3.Default = "219"; field3.FieldsToEnable = "StateID"; field3.EnablingValues = "219"; field3.FieldsToDisable = "Province"; field3.DisablingValues = "219"; Obout.SuperForm.DropDownListField field4 = new Obout.SuperForm.DropDownListField(); field4.DataField = "StateID"; field4.HeaderText = "State / Province"; field4.Required = true; field4.DataSourceID = "StatesDataSource"; field4.DataValueField = "State"; field4.DataTextField = "State"; Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField(); field5.DataField = "Province"; Obout.SuperForm.CommandField field6 = new Obout.SuperForm.CommandField(); field6.ShowInsertButton = true; field6.ShowCancelButton = false; field6.ButtonType = ButtonType.Button; field6.ItemStyle.HorizontalAlign = HorizontalAlign.Center; SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.DataKeyNames = new string[] { "ProductID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "ProductID"; field1.HeaderText = "Product ID"; field1.ReadOnly = true; field1.InsertVisible = false; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ProductName"; field2.HeaderText = "Product Name"; field2.Required = true; Obout.SuperForm.CheckBoxField field3 = new Obout.SuperForm.CheckBoxField(); field3.DataField = "Discontinued"; field3.HeaderText = "Discontinued"; field3.FieldsToDisable = "UnitPrice,UnitsInStock,UnitsOnOrder"; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "UnitPrice"; field4.HeaderText = "Unit Price"; field4.Collapsed = true; Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField(); field5.DataField = "UnitsInStock"; field5.HeaderText = "Units In Stock"; field5.Collapsed = true; Obout.SuperForm.BoundField field6 = new Obout.SuperForm.BoundField(); field6.DataField = "UnitsOnOrder"; field6.HeaderText = "Units On Order"; field6.Collapsed = true; SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Registration Form"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = false; SuperForm1.AutoGenerateEditButton = false; SuperForm1.AutoGenerateDeleteButton = false; SuperForm1.DataKeyNames = new string[] { "Order ID" }; SuperForm1.AllowPaging = false; SuperForm1.DefaultMode = DetailsViewMode.Insert; SuperForm1.DataBound += SuperForm1_DataBound; SuperForm1.ItemInserting += SuperForm1_Inserting; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "UserName"; field1.HeaderText = "Username"; field1.Required = true; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "Password"; field2.HeaderText = "Password"; field2.Required = true; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "FirstName"; field3.HeaderText = "First Name"; field3.Required = true; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "LastName"; field4.HeaderText = "Last Name"; field4.Required = true; Obout.SuperForm.CommandField field5 = new Obout.SuperForm.CommandField(); field5.ShowInsertButton = true; field5.ShowCancelButton = false; field5.InsertText = "Register"; field5.ButtonType = ButtonType.Button; field5.ItemStyle.HorizontalAlign = HorizontalAlign.Center; SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Order Details"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "OrderID"; field1.HeaderText = "OrderID"; field1.ReadOnly = true; field1.InsertVisible = false; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ShipName"; field2.HeaderText = "Ship Name"; field2.Required = true; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "ShipCity"; field3.HeaderText = "Ship City"; field3.Required = true; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "ShipCountry"; field4.HeaderText = "Ship Country"; field4.Required = true; Obout.SuperForm.DateField field5 = new Obout.SuperForm.DateField(); field5.DataField = "OrderDate"; field5.HeaderText = "Order Date"; field5.Required = true; field5.DataFormatString = "{0:MM/dd/yyyy}"; field5.ApplyFormatInEditMode = true; SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.DataKeyNames = new string[] { "ProductID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; SuperForm1.EnableButtonsOnChange = true; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "ProductID"; field1.HeaderText = "Product ID"; field1.ReadOnly = true; field1.InsertVisible = false; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ProductName"; field2.HeaderText = "Product Name"; field2.Required = true; Obout.SuperForm.CheckBoxField field3 = new Obout.SuperForm.CheckBoxField(); field3.DataField = "Discontinued"; field3.HeaderText = "Discontinued"; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "UnitPrice"; field4.HeaderText = "Unit Price"; Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField(); field5.DataField = "UnitsInStock"; field5.HeaderText = "Units In Stock"; Obout.SuperForm.BoundField field6 = new Obout.SuperForm.BoundField(); field6.DataField = "UnitsOnOrder"; field6.HeaderText = "Units On Order"; SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.AllowPaging = true; SuperForm1.FolderStyle = "styles/black_glass"; SuperForm1.Direction = Direction.Horizontal; SuperForm1.DefaultMode = DetailsViewMode.Edit; SuperForm1.Width = Unit.Pixel(630); SuperForm1.FieldHeaderStyle.Width = Unit.Pixel(110); Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "OrderID"; field1.HeaderText = "Order ID"; field1.ReadOnly = true; field1.InsertVisible = false; field1.Visible = false; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ShipName"; field2.HeaderText = "Ship Name"; Obout.SuperForm.DropDownListField field3 = new Obout.SuperForm.DropDownListField(); field3.DataField = "ShipCountry"; field3.DisplayField = "ShipCountry"; field3.HeaderText = "Ship Country"; field3.DataSourceID = "SqlDataSource2"; Obout.SuperForm.DateField field4 = new Obout.SuperForm.DateField(); field4.DataField = "OrderDate"; field4.HeaderText = "Order Date"; field4.DataFormatString = "{0:MM/dd/yyyy}"; field4.ApplyFormatInEditMode = true; SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.AutoGenerateDateFields = true; SuperForm1.DataKeyNames = new string[] { "CustomerID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; SuperForm1.ItemUpdating += SuperForm1_ItemUpdating; SuperForm1.ItemInserting += SuperForm1_ItemInserting; SuperForm1.DataBound += SuperForm1_DataBound; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "CustomerID"; field1.HeaderText = "Customer ID"; field1.ReadOnly = true; field1.InsertVisible = false; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "CompanyName"; field2.HeaderText = "Company Name"; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "ContactName"; field3.HeaderText = "Contact Name"; Obout.SuperForm.TemplateField field4 = new Obout.SuperForm.TemplateField(); field4.HeaderText = "Countries"; field4.ItemTemplate = new CountriesItemTemplate(); field4.EditItemTemplate = new CountriesEditItemTemplate(); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.AutoGenerateDateFields = true; SuperForm1.DataKeyNames = new string[] { "CustomerID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; SuperForm1.ItemUpdating += SuperForm1_ItemUpdating; SuperForm1.ItemInserting += SuperForm1_ItemInserting; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "CustomerID"; field1.HeaderText = "Customer ID"; field1.ReadOnly = true; field1.InsertVisible = false; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "CompanyName"; field2.HeaderText = "Company Name"; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "ContactName"; field3.HeaderText = "Contact Name"; Obout.SuperForm.TemplateField field4 = new Obout.SuperForm.TemplateField(); field4.HeaderText = "Countries"; field4.ItemTemplate = new CountriesItemTemplate(); field4.EditItemTemplate = new CountriesEditItemTemplate(); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Customer Details"; SuperForm1.DataSourceID = "sds1"; SuperForm1.AutoGenerateRows = false; SuperForm1.DataKeyNames = new string[] { "CustomerID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.AllowDataKeysInsert = true; Obout.SuperForm.BoundField field11 = new Obout.SuperForm.BoundField(); field11.DataField = "CustomerID"; field11.HeaderText = "Customer ID"; field11.ReadOnly = true; Obout.SuperForm.BoundField field12 = new Obout.SuperForm.BoundField(); field12.DataField = "CompanyName"; field12.HeaderText = "Company Name"; Obout.SuperForm.BoundField field13 = new Obout.SuperForm.BoundField(); field13.DataField = "ContactName"; field13.HeaderText = "Contact Name"; Obout.SuperForm.BoundField field14 = new Obout.SuperForm.BoundField(); field14.DataField = "Country"; field14.HeaderText = "Country"; SuperForm1.Fields.Add(field11); SuperForm1.Fields.Add(field12); SuperForm1.Fields.Add(field13); SuperForm1.Fields.Add(field14); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Order Details"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; Obout.SuperForm.BoundField field11 = new Obout.SuperForm.BoundField(); field11.DataField = "OrderID"; field11.HeaderText = "Order ID"; field11.ReadOnly = true; field11.InsertVisible = false; Obout.SuperForm.BoundField field12 = new Obout.SuperForm.BoundField(); field12.DataField = "ShipName"; field12.HeaderText = "Ship Name"; Obout.SuperForm.MultiLineField field13 = new Obout.SuperForm.MultiLineField(); field13.DataField = "AdditionalInformation"; field13.HeaderText = "Information"; Obout.SuperForm.MultiLineField field14 = new Obout.SuperForm.MultiLineField(); field14.DataField = "AdditionalInformationHTML"; field14.HeaderText = "Additional Information"; SuperForm1.Fields.Add(field11); SuperForm1.Fields.Add(field12); SuperForm1.Fields.Add(field13); SuperForm1.Fields.Add(field14); SuperForm1Container.Controls.Add(SuperForm1); }
public void CreatetplRowEdit(Object sender, Obout.Grid.GridRuntimeTemplateEventArgs e) { PlaceHolder ph1 = new PlaceHolder(); e.Container.Controls.Add(ph1); Literal inputText = new Literal(); inputText.Text = "<input type=\"hidden\" id=\"OrderID\" />"; ValidationSummary validateGroup1 = new ValidationSummary(); validateGroup1.ID = "ValidationSummary1"; validateGroup1.ValidationGroup = "Group1"; ph1.Controls.Add(inputText); ph1.Controls.Add(validateGroup1); SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = false; SuperForm1.AutoGenerateEditButton = false; SuperForm1.AutoGenerateDeleteButton = false; SuperForm1.ValidationGroup = "Group1"; SuperForm1.Width = Unit.Percentage(99); SuperForm1.DataKeyNames = new string[] { "Order ID" }; SuperForm1.DefaultMode = DetailsViewMode.Insert; RequiredFieldValidator requiredFieldValidator1 = new RequiredFieldValidator(); requiredFieldValidator1.ID = "RequiredFieldValidator1"; requiredFieldValidator1.Display = ValidatorDisplay.Dynamic; requiredFieldValidator1.ErrorMessage = "Ship Name is mandatory"; requiredFieldValidator1.Text = "*"; requiredFieldValidator1.ValidationGroup = "Group1"; RequiredFieldValidator requiredFieldValidator2 = new RequiredFieldValidator(); requiredFieldValidator2.ID = "RequiredFieldValidator2"; requiredFieldValidator2.Display = ValidatorDisplay.Dynamic; requiredFieldValidator2.ErrorMessage = "Ship Address is mandatory"; requiredFieldValidator2.Text = "*"; requiredFieldValidator2.ValidationGroup = "Group1"; RequiredFieldValidator requiredFieldValidator3 = new RequiredFieldValidator(); requiredFieldValidator3.ID = "RequiredFieldValidator3"; requiredFieldValidator3.Display = ValidatorDisplay.Dynamic; requiredFieldValidator3.ErrorMessage = "Ship City is mandatory"; requiredFieldValidator3.Text = "*"; requiredFieldValidator3.ValidationGroup = "Group1"; RequiredFieldValidator requiredFieldValidator4 = new RequiredFieldValidator(); requiredFieldValidator4.ID = "RequiredFieldValidator4"; requiredFieldValidator4.Display = ValidatorDisplay.Dynamic; requiredFieldValidator4.ErrorMessage = "Ship Country is mandatory"; requiredFieldValidator4.Text = "*"; requiredFieldValidator4.ValidationGroup = "Group1"; RequiredFieldValidator requiredFieldValidator5 = new RequiredFieldValidator(); requiredFieldValidator5.ID = "RequiredFieldValidator5"; requiredFieldValidator5.Display = ValidatorDisplay.Dynamic; requiredFieldValidator5.ErrorMessage = "Order Date is mandatory"; requiredFieldValidator5.Text = "*"; requiredFieldValidator5.ValidationGroup = "Group1"; RangeValidator rangeValidator1 = new RangeValidator(); rangeValidator1.ID="RangeValidator1"; rangeValidator1.Display = ValidatorDisplay.Dynamic; rangeValidator1.MinimumValue = "1900/1/1"; rangeValidator1.MaximumValue = "2039/12/31"; rangeValidator1.Type = ValidationDataType.Date; rangeValidator1.ErrorMessage = "Order Date needs to be in this format: mm/dd/yyyy"; rangeValidator1.Text = "*"; rangeValidator1.ValidationGroup = "Group1"; RequiredFieldValidator requiredFieldValidator6 = new RequiredFieldValidator(); requiredFieldValidator6.ID = "RequiredFieldValidator6"; requiredFieldValidator6.Display = ValidatorDisplay.Dynamic; requiredFieldValidator6.ErrorMessage = "Required Date is mandatory"; requiredFieldValidator6.Text = "*"; requiredFieldValidator6.ValidationGroup = "Group1"; RangeValidator rangeValidator2 = new RangeValidator(); rangeValidator2.ID="RangeValidator2"; rangeValidator2.Display = ValidatorDisplay.Dynamic; rangeValidator2.MinimumValue = "1900/1/1"; rangeValidator2.MaximumValue = "2039/12/31"; rangeValidator2.Type = ValidationDataType.Date; rangeValidator2.ErrorMessage = "Required Date needs to be in this format: mm/dd/yyyy"; rangeValidator2.Text = "*"; rangeValidator2.ValidationGroup = "Group1"; RequiredFieldValidator requiredFieldValidator7 = new RequiredFieldValidator(); requiredFieldValidator7.ID = "RequiredFieldValidator7"; requiredFieldValidator7.Display = ValidatorDisplay.Dynamic; requiredFieldValidator7.ErrorMessage = "Shipped Date is mandatory"; requiredFieldValidator7.Text = "*"; requiredFieldValidator7.ValidationGroup = "Group1"; RangeValidator rangeValidator3 = new RangeValidator(); rangeValidator3.ID = "RangeValidator3"; rangeValidator3.Display = ValidatorDisplay.Dynamic; rangeValidator3.MinimumValue = "1900/1/1"; rangeValidator3.MaximumValue = "2039/12/31"; rangeValidator3.Type = ValidationDataType.Date; rangeValidator3.ErrorMessage = "Shipped Date needs to be in this format: mm/dd/yyyy"; rangeValidator3.Text = "*"; rangeValidator3.ValidationGroup = "Group1"; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "ShipName"; field1.HeaderText = "Ship Name"; field1.FieldSetID = "FieldSet1"; field1.Validators.Add(requiredFieldValidator1); Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ShipAddress"; field2.HeaderText = "Ship Address"; field2.FieldSetID = "FieldSet1"; field2.Validators.Add(requiredFieldValidator2); Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "ShipCity"; field3.HeaderText = "Ship City"; field3.FieldSetID = "FieldSet1"; field3.Validators.Add(requiredFieldValidator3); Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "ShipRegion"; field4.HeaderText = "Ship Region"; field4.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField(); field5.DataField = "ShipPostalCode"; field5.HeaderText = "Zip Cod"; field5.FieldSetID = "FieldSet1"; Obout.SuperForm.DropDownListField field6 = new Obout.SuperForm.DropDownListField(); field6.DataField = "ShipCountry"; field6.HeaderText = "Ship Country"; field6.FieldSetID = "FieldSet1"; field6.DataSourceID = "SqlDataSource3"; field6.Validators.Add(requiredFieldValidator4); Obout.SuperForm.DateField field7 = new Obout.SuperForm.DateField(); field7.DataField = "OrderDate"; field7.HeaderText = "Order Date"; field7.FieldSetID = "FieldSet2"; field7.DataFormatString = "{0:MM/dd/yyyy}"; field7.ApplyFormatInEditMode = true; field7.Validators.Add(requiredFieldValidator5); field7.Validators.Add(rangeValidator1); Obout.SuperForm.DateField field8 = new Obout.SuperForm.DateField(); field8.DataField = "RequiredDate"; field8.HeaderText = "Required Date"; field8.FieldSetID = "FieldSet2"; field8.DataFormatString = "{0:MM/dd/yyyy}"; field8.ApplyFormatInEditMode = true; field8.Validators.Add(requiredFieldValidator6); field8.Validators.Add(rangeValidator2); Obout.SuperForm.DateField field9 = new Obout.SuperForm.DateField(); field9.DataField = "ShippedDate"; field9.HeaderText = "Shipped Date"; field9.FieldSetID = "FieldSet2"; field9.DataFormatString = "{0:MM/dd/yyyy}"; field9.ApplyFormatInEditMode = true; field9.Validators.Add(requiredFieldValidator7); field9.Validators.Add(rangeValidator3); Obout.SuperForm.BoundField field10 = new Obout.SuperForm.BoundField(); field10.DataField = "ShipVia"; field10.HeaderText = "Ship Via"; field10.FieldSetID = "FieldSet2"; Obout.SuperForm.CheckBoxField field11 = new Obout.SuperForm.CheckBoxField(); field11.DataField = "Sent"; field11.HeaderText = "Sent"; field11.FieldSetID = "FieldSet2"; Obout.SuperForm.MultiLineField field12 = new Obout.SuperForm.MultiLineField(); field12.DataField = "AdditionalInformation"; field12.HeaderText = ""; field12.FieldSetID = "FieldSet3"; field12.HeaderStyle.Width = 1; Obout.SuperForm.TemplateField field13 = new Obout.SuperForm.TemplateField(); field13.FieldSetID = "FieldSet4"; field13.EditItemTemplate = new btnUpdateEditItemTemplate(); Obout.SuperForm.FieldSetRow fieldSetRow1 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet1 = new Obout.SuperForm.FieldSet(); fieldSet1.ID = "FieldSet1"; fieldSet1.Title = "Ship Information"; fieldSetRow1.Items.Add(fieldSet1); Obout.SuperForm.FieldSet fieldSet2 = new Obout.SuperForm.FieldSet(); fieldSet2.ID = "FieldSet2"; fieldSet2.Title = "Order Information"; fieldSetRow1.Items.Add(fieldSet2); Obout.SuperForm.FieldSet fieldSet3 = new Obout.SuperForm.FieldSet(); fieldSet3.ID = "FieldSet3"; fieldSet3.Title = "Additional Information"; fieldSetRow1.Items.Add(fieldSet3); Obout.SuperForm.FieldSetRow fieldSetRow2 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet4 = new Obout.SuperForm.FieldSet(); fieldSet4.ID = "FieldSet4"; fieldSet4.ColumnSpan = 3; fieldSet4.CssClass = "command-row"; fieldSetRow2.Items.Add(fieldSet4); SuperForm1.FieldSets.Add(fieldSetRow1); SuperForm1.FieldSets.Add(fieldSetRow2); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1.Fields.Add(field7); SuperForm1.Fields.Add(field8); SuperForm1.Fields.Add(field9); SuperForm1.Fields.Add(field10); SuperForm1.Fields.Add(field11); SuperForm1.Fields.Add(field12); SuperForm1.Fields.Add(field13); ph1.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Add new order"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Insert; SuperForm1.Width = Unit.Pixel(480); SuperForm1.ItemUpdating += SuperForm1_ItemUpdating; SuperForm1.ItemInserting += SuperForm1_ItemInserting; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "OrderID"; field1.HeaderText = "Order ID"; field1.ReadOnly = true; field1.InsertVisible = false; field1.FieldSetID = "FieldSet1"; field1.Visible = false; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ShipName"; field2.HeaderText = "Ship Name"; field2.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "ShipCity"; field3.HeaderText = "Ship City"; field3.FieldSetID = "FieldSet1"; Obout.SuperForm.DateField field4 = new Obout.SuperForm.DateField(); field4.DataField = "OrderDate"; field4.HeaderText = "Order Date"; field4.DataFormatString = "{0:MM/dd/yyyy}"; field4.ApplyFormatInEditMode = true; field4.FieldSetID = "FieldSet2"; Obout.SuperForm.DropDownListField field5 = new Obout.SuperForm.DropDownListField(); field5.DataField = "ShipCountry"; field5.HeaderText = "Country"; field5.DisplayField = "ShipCountry"; field5.DataSourceID = "SqlDataSource2"; field5.FieldSetID = "FieldSet2"; Obout.SuperForm.TemplateField field6 = new Obout.SuperForm.TemplateField(); field6.HeaderText = "Details"; field6.FieldSetID = "FieldSet3"; field6.ItemTemplate = new DetailsItemTemplate(); field6.EditItemTemplate = new DetailsEditItemTemplate(); Obout.SuperForm.FieldSetRow fieldSetRow1 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet1 = new Obout.SuperForm.FieldSet(); fieldSet1.ID = "FieldSet1"; fieldSet1.Direction = Direction.Horizontal; fieldSet1.CssClass = "field-set"; fieldSetRow1.Items.Add(fieldSet1); Obout.SuperForm.FieldSetRow fieldSetRow2 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet2 = new Obout.SuperForm.FieldSet(); fieldSet2.ID = "FieldSet2"; fieldSet2.Direction = Direction.Horizontal; fieldSet2.CssClass = "field-set"; fieldSetRow2.Items.Add(fieldSet2); Obout.SuperForm.FieldSetRow fieldSetRow3 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet3 = new Obout.SuperForm.FieldSet(); fieldSet3.ID = "FieldSet3"; fieldSet3.Direction = Direction.Horizontal; fieldSet3.CssClass = "field-set"; fieldSetRow3.Items.Add(fieldSet3); SuperForm1.FieldSets.Add(fieldSetRow1); SuperForm1.FieldSets.Add(fieldSetRow2); SuperForm1.FieldSets.Add(fieldSetRow3); SuperForm1.FieldHeaderStyle.Width = Unit.Pixel(200); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Width = Unit.Pixel(350); SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.AutoGenerateDateFields = true; SuperForm1.DataKeyNames = new string[] { "ProductID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; SuperForm1.HeaderStyle.Width = Unit.Pixel(150); SuperForm1.ItemUpdating += SuperForm1_ItemUpdating; SuperForm1.ItemInserting += SuperForm1_ItemInserting; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "ProductID"; field1.HeaderText = "Product ID"; field1.ReadOnly = true; field1.InsertVisible = false; field1.ItemStyle.Width = Unit.Pixel(225); Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ProductName"; field2.HeaderText = "Product Name"; field2.ItemStyle.Width = Unit.Pixel(225); Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "UnitPrice"; field3.HeaderText = "Unit Price"; field3.ItemStyle.Width = Unit.Pixel(225); Obout.SuperForm.TemplateField field4 = new Obout.SuperForm.TemplateField(); field4.HeaderText = "Image"; field4.ItemTemplate = new ImageItemTemplate(); field4.EditItemTemplate = new ImageEditItemTemplate(); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1Container.Controls.Add(SuperForm1); fileName = ""; if (Page.IsPostBack) { HttpFileCollection files = Page.Request.Files; if (files.Count > 0) { fileName = DateTime.Now.Ticks.ToString() + "_" + files[0].FileName; files[0].SaveAs(Server.MapPath("~/Grid/resources/images/products/" + fileName)); } } }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Order Details"; SuperForm1.DataSourceID = "SqlDataSource2"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.AutoGenerateDateFields = true; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; SuperForm1.ItemUpdated += SuperForm1_ItemUpdated; SuperForm1.ItemCommand += SuperForm1_ItemCommand; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "OrderID"; field1.HeaderText = "Order ID"; field1.ReadOnly = true; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ShipName"; field2.HeaderText = "Ship Name"; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "ShipCity"; field3.HeaderText = "Ship City"; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "ShipRegion"; field4.HeaderText = "Ship Region"; Obout.SuperForm.DropDownListField field5 = new Obout.SuperForm.DropDownListField(); field5.DataField = "ShipCountry"; field5.HeaderText = "Ship Country"; field5.DataSourceID = "SqlDataSource3"; Obout.SuperForm.DateField field6 = new Obout.SuperForm.DateField(); field6.DataField = "OrderDate"; field6.HeaderText = "Order Date"; field6.DataFormatString = "{0:MM/dd/yyyy}"; field6.ApplyFormatInEditMode = true; Obout.SuperForm.DateField field7 = new Obout.SuperForm.DateField(); field7.DataField = "ShippedDate"; field7.HeaderText = "Shipped Date"; field7.DataFormatString = "{0:MM/dd/yyyy}"; field7.ApplyFormatInEditMode = true; Obout.SuperForm.DateField field8 = new Obout.SuperForm.DateField(); field8.DataField = "RequiredDate"; field8.HeaderText = "Required Date"; field8.DataFormatString = "{0:MM/dd/yyyy}"; field8.ApplyFormatInEditMode = true; SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1.Fields.Add(field7); SuperForm1.Fields.Add(field8); SuperForm1Container.Controls.Add(SuperForm1); }
protected void DataBindRowEditTemplate(Object sender, EventArgs e) { PlaceHolder oPH1 = sender as PlaceHolder; Obout.Grid.TemplateContainer oContainer = oPH1.NamingContainer as Obout.Grid.TemplateContainer; Literal hiddenInput = new Literal(); hiddenInput.Text = "<input type=\"hidden\" id=\"OrderID\" />"; SuperForm SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.DataSourceID = "SqlDataSource2"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = false; SuperForm1.AutoGenerateEditButton = false; SuperForm1.AutoGenerateDeleteButton = false; SuperForm1.AutoGenerateDateFields = true; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.Width = Unit.Percentage(99); SuperForm1.DefaultMode = DetailsViewMode.Insert; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "OrderID"; field1.HeaderText = "Order ID"; field1.ReadOnly = true; field1.InsertVisible = false; field1.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ShipName"; field2.HeaderText = "Ship Name"; field2.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "ShipAddress"; field3.HeaderText = "Ship Address"; field3.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "ShipCity"; field4.HeaderText = "Ship City"; field4.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField(); field5.DataField = "ShipRegion"; field5.HeaderText = "Ship Region"; field5.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field6 = new Obout.SuperForm.BoundField(); field6.DataField = "ShipPostalCode"; field6.HeaderText = "Zip Code"; field6.FieldSetID = "FieldSet1"; Obout.SuperForm.DropDownListField field7 = new Obout.SuperForm.DropDownListField(); field7.DataField = "ShipCountry"; field7.HeaderText = "Ship Country"; field7.FieldSetID = "FieldSet1"; field7.DataSourceID = "SqlDataSource3"; Obout.SuperForm.DateField field8 = new Obout.SuperForm.DateField(); field8.DataField = "OrderDate"; field8.HeaderText = "Order Date"; field8.FieldSetID = "FieldSet2"; field8.DataFormatString = "{0:MM/dd/yyyy}"; field8.ApplyFormatInEditMode = true; Obout.SuperForm.DateField field9 = new Obout.SuperForm.DateField(); field9.DataField = "RequiredDate"; field9.HeaderText = "Required Date"; field9.FieldSetID = "FieldSet2"; field9.DataFormatString = "{0:MM/dd/yyyy}"; field9.ApplyFormatInEditMode = true; Obout.SuperForm.DateField field10 = new Obout.SuperForm.DateField(); field10.DataField = "ShippedDate"; field10.HeaderText = "Shipped Date"; field10.FieldSetID = "FieldSet2"; field10.DataFormatString = "{0:MM/dd/yyyy}"; field10.ApplyFormatInEditMode = true; Obout.SuperForm.BoundField field11 = new Obout.SuperForm.BoundField(); field11.DataField = "ShipVia"; field11.HeaderText = "Ship Via"; field11.FieldSetID = "FieldSet2"; Obout.SuperForm.CheckBoxField field12 = new Obout.SuperForm.CheckBoxField(); field12.DataField = "Sent"; field12.HeaderText = "Sent"; field12.FieldSetID = "FieldSet2"; Obout.SuperForm.MultiLineField field13 = new Obout.SuperForm.MultiLineField(); field13.DataField = "AdditionalInformation"; field13.HeaderText = "Additional Information"; field13.FieldSetID = "FieldSet3"; field13.HeaderStyle.Width = 1; Obout.SuperForm.TemplateField field14 = new Obout.SuperForm.TemplateField(); field14.FieldSetID = "FieldSet4"; field14.EditItemTemplate = new ButtonsEditItemTemplate(); Obout.SuperForm.FieldSetRow fieldSetRow1 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet1 = new Obout.SuperForm.FieldSet(); fieldSet1.ID = "FieldSet1"; fieldSet1.Title = "Ship Information"; Obout.SuperForm.FieldSet fieldSet2 = new Obout.SuperForm.FieldSet(); fieldSet2.ID = "FieldSet2"; fieldSet2.Title = "Order Information"; Obout.SuperForm.FieldSet fieldSet3 = new Obout.SuperForm.FieldSet(); fieldSet3.ID = "FieldSet3"; fieldSet3.Title = "Additional Information"; fieldSetRow1.Items.Add(fieldSet1); fieldSetRow1.Items.Add(fieldSet2); fieldSetRow1.Items.Add(fieldSet3); Obout.SuperForm.FieldSetRow fieldSetRow2 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet4 = new Obout.SuperForm.FieldSet(); fieldSet4.ID = "FieldSet4"; fieldSet4.ColumnSpan = 3; fieldSet4.CssClass = "command-row"; fieldSetRow2.Items.Add(fieldSet4); SuperForm1.FieldSets.Add(fieldSetRow1); SuperForm1.FieldSets.Add(fieldSetRow2); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1.Fields.Add(field7); SuperForm1.Fields.Add(field8); SuperForm1.Fields.Add(field9); SuperForm1.Fields.Add(field10); SuperForm1.Fields.Add(field11); SuperForm1.Fields.Add(field12); SuperForm1.Fields.Add(field13); SuperForm1.Fields.Add(field14); oPH1.Controls.Add(hiddenInput); oPH1.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.AutoGenerateRows = false; SuperForm1.Width = Unit.Pixel(630); SuperForm1.Title = "Payment Information"; SuperForm1.FolderStyle = "styles/black_glass"; SuperForm1.DefaultMode = DetailsViewMode.Insert; SuperForm1.ItemInserting += SuperForm1_Inserting; SuperForm1.DataBound += SuperForm1_DataBound; Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField(); field5.DataField = "CardNumber"; field5.HeaderText = "Card Number"; field5.FieldSetID = "FieldSet2"; field5.Required = true; field5.ControlStyle.Width = Unit.Pixel(150); /*MaskedEditExtender extender1 = new MaskedEditExtender(); extender1.ID = "MaskedEditExtender1"; extender1.Mask = "9999-9999-9999-9999"; extender1.MessageValidatorTip = true; extender1.MaskType = MaskedEditType.Number; field5.Masks.Add(extender1);*/ Obout.SuperForm.DropDownListField field6 = new Obout.SuperForm.DropDownListField(); field6.DataField = "ExpirationYear"; field6.HeaderText = "Expiration Year"; field6.FieldSetID = "FieldSet2"; field6.ControlStyle.Width = 93; field6.Required = true; Obout.SuperForm.DropDownListField field7 = new Obout.SuperForm.DropDownListField(); field7.DataField = "ExpirationMonth"; field7.HeaderText = "ExpirationMonth"; field7.FieldSetID = "FieldSet2"; field7.ControlStyle.Width = 117; field7.Required = true; Obout.SuperForm.BoundField field8 = new Obout.SuperForm.BoundField(); field8.DataField = "CIN"; field8.HeaderText = "Security Code"; field8.FieldSetID = "FieldSet2"; field8.ControlStyle.Width = 83; field8.Required = true; field8.MaxLength = 3; /*FilteredTextBoxExtender numbers = new FilteredTextBoxExtender(); numbers.FilterType = FilterTypes.Numbers; field8.Filters.Add(numbers);*/ Obout.SuperForm.TemplateField dummyField = new Obout.SuperForm.TemplateField(); dummyField.FieldSetID = "FieldSet3"; dummyField.ItemTemplate = new DummyItemTemplate(); dummyField.ItemStyle.Width = 150; Obout.SuperForm.CheckBoxField field4 = new Obout.SuperForm.CheckBoxField(); field4.DataField = "SameAsBilling"; field4.FieldSetID = "FieldSet4"; field4.Text = "Same as the billing"; field4.FieldsToDisable = "UserCompanyName"; field4.FieldsToDisable = "UserCompanyName,UserFirstName,UserLastName,UserEmailAddress,UserAddress,UserCountryID,UserStateID,UserProvince,UserZip,UserVatID,UserPhone,UserFax"; field4.ItemStyle.Width = 150; Obout.SuperForm.BoundField field9 = new Obout.SuperForm.BoundField(); field9.DataField = "BillingCompanyName"; field9.HeaderText = "Company Name"; field9.FieldSetID = "FieldSet3"; Obout.SuperForm.BoundField field10 = new Obout.SuperForm.BoundField(); field10.DataField = "BillingFirstName"; field10.HeaderText = "First Name"; field10.FieldSetID = "FieldSet3"; field10.Required = true; Obout.SuperForm.BoundField field11 = new Obout.SuperForm.BoundField(); field11.DataField = "BillingLastName"; field11.HeaderText = "Last Name"; field11.FieldSetID = "FieldSet3"; field11.Required = true; Obout.SuperForm.BoundField field12 = new Obout.SuperForm.BoundField(); field12.DataField = "BillingEmailAddress"; field12.HeaderText = "Email Address"; field12.FieldSetID = "FieldSet3"; field12.Required = true; Obout.SuperForm.MultiLineField field13 = new Obout.SuperForm.MultiLineField(); field13.DataField = "BillingAddress"; field13.HeaderText = "Address"; field13.FieldSetID = "FieldSet3"; field13.Required = true; Obout.SuperForm.DropDownListField field14 = new Obout.SuperForm.DropDownListField(); field14.DataField = "BillingCountryID"; field14.HeaderText = "Country"; field14.FieldSetID = "FieldSet3"; field14.Required = true; field14.DataSourceID = "CountriesDataSource"; field14.DataValueField = "CountryID"; field14.DataTextField = "CountryName"; field14.Default = "219"; field14.FieldsToEnable = "BillingStateID"; field14.EnablingValues = "219"; field14.FieldsToDisable = "BillingProvince"; field14.DisablingValues = "219"; Obout.SuperForm.DropDownListField field15 = new Obout.SuperForm.DropDownListField(); field15.DataField = "BillingStateID"; field15.HeaderText = "State"; field15.FieldSetID = "FieldSet3"; field15.Required = true; field15.DataSourceID = "StatesDataSource"; field15.DataValueField = "State"; field15.DataTextField = "State"; Obout.SuperForm.BoundField field16 = new Obout.SuperForm.BoundField(); field16.DataField = "BillingProvince"; field16.FieldSetID = "FieldSet3"; Obout.SuperForm.BoundField field17 = new Obout.SuperForm.BoundField(); field17.DataField = "BillingZip"; field17.HeaderText = "Zip Code / Postal Code"; field17.FieldSetID = "FieldSet3"; Obout.SuperForm.BoundField field18 = new Obout.SuperForm.BoundField(); field18.DataField = "BillingVatID"; field18.HeaderText = "VAT Exemption ID"; field18.FieldSetID = "FieldSet3"; Obout.SuperForm.BoundField field19 = new Obout.SuperForm.BoundField(); field19.DataField = "BillingPhone"; field19.HeaderText = "Phone"; field19.FieldSetID = "FieldSet3"; /*MaskedEditExtender extender2 = new MaskedEditExtender(); extender2.ID = "MaskedEditExtender2"; extender2.Mask = "(999)999-9999"; extender2.MaskType = MaskedEditType.Number; field19.Masks.Add(extender2);*/ Obout.SuperForm.BoundField field20 = new Obout.SuperForm.BoundField(); field20.DataField = "BillingFax"; field20.HeaderText = "Fax"; field20.FieldSetID = "FieldSet3"; /*MaskedEditExtender extender3 = new MaskedEditExtender(); extender3.ID = "MaskedEditExtender3"; extender3.Mask = "(999)999-9999"; extender3.MaskType = MaskedEditType.Number; field20.Masks.Add(extender3);*/ Obout.SuperForm.BoundField field21 = new Obout.SuperForm.BoundField(); field21.DataField = "UserCompanyName"; field21.HeaderText = "Company Name"; field21.FieldSetID = "FieldSet4"; Obout.SuperForm.BoundField field22 = new Obout.SuperForm.BoundField(); field22.DataField = "UserFirstName"; field22.HeaderText = "First Name"; field22.FieldSetID = "FieldSet4"; Obout.SuperForm.BoundField field23 = new Obout.SuperForm.BoundField(); field23.DataField = "UserLastName"; field23.HeaderText = "Last Name"; field23.FieldSetID = "FieldSet4"; Obout.SuperForm.BoundField field24 = new Obout.SuperForm.BoundField(); field24.DataField = "UserEmailAddress"; field24.HeaderText = "Email Address"; field24.FieldSetID = "FieldSet4"; Obout.SuperForm.MultiLineField field25 = new Obout.SuperForm.MultiLineField(); field25.DataField = "UserAddress"; field25.HeaderText = "Address"; field25.FieldSetID = "FieldSet4"; Obout.SuperForm.DropDownListField field26 = new Obout.SuperForm.DropDownListField(); field26.DataField = "UserCountryID"; field26.HeaderText = "Country"; field26.FieldSetID = "FieldSet4"; field26.DataSourceID = "CountriesDataSource"; field26.DataValueField = "CountryID"; field26.DataTextField = "CountryName"; field26.Default = "219"; field26.FieldsToEnable = "UserStateID"; field26.EnablingValues = "219"; field26.FieldsToDisable = "UserProvince"; field26.DisablingValues = "219"; Obout.SuperForm.DropDownListField field27 = new Obout.SuperForm.DropDownListField(); field27.DataField = "UserStateID"; field27.HeaderText = "State"; field27.FieldSetID = "FieldSet4"; field27.DataSourceID = "StatesDataSource"; field27.DataValueField = "State"; field27.DataTextField = "State"; Obout.SuperForm.BoundField field28 = new Obout.SuperForm.BoundField(); field28.DataField = "UserProvince"; field28.FieldSetID = "FieldSet4"; Obout.SuperForm.BoundField field29 = new Obout.SuperForm.BoundField(); field29.DataField = "UserZip"; field29.FieldSetID = "FieldSet4"; field29.HeaderText = "Zip Code / Postal Code"; Obout.SuperForm.BoundField field30 = new Obout.SuperForm.BoundField(); field30.DataField = "UserVatID"; field30.FieldSetID = "FieldSet4"; field30.HeaderText = "VAT Exemption ID"; Obout.SuperForm.BoundField field31 = new Obout.SuperForm.BoundField(); field31.DataField = "UserPhone"; field31.FieldSetID = "FieldSet4"; field31.HeaderText = "Phone"; /*MaskedEditExtender extender4 = new MaskedEditExtender(); extender4.ID = "MaskedEditExtender4"; extender4.Mask = "(999)999-9999"; extender4.MaskType = MaskedEditType.Number; field31.Masks.Add(extender4);*/ Obout.SuperForm.BoundField field32 = new Obout.SuperForm.BoundField(); field32.DataField = "UserFax"; field32.HeaderText = "Fax"; field32.FieldSetID = "FieldSet4"; /*MaskedEditExtender extender5 = new MaskedEditExtender(); extender5.ID = "MaskedEditExtender5"; extender5.Mask = "(999)999-9999"; extender5.MaskType = MaskedEditType.Number; field32.Masks.Add(extender5);*/ Obout.SuperForm.CommandField field33 = new Obout.SuperForm.CommandField(); field33.ShowInsertButton = true; field33.InsertText = "Buy Now"; field33.ShowCancelButton = false; field33.ButtonType = ButtonType.Button; field33.ItemStyle.HorizontalAlign = HorizontalAlign.Center; field33.FieldSetID = "CommandFields"; Obout.SuperForm.FieldSetRow fieldSetRow2 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet2 = new Obout.SuperForm.FieldSet(); fieldSet2.ID = "FieldSet2"; fieldSet2.Direction = Direction.Horizontal; fieldSet2.ColumnSpan = 2; fieldSetRow2.Items.Add(fieldSet2); Obout.SuperForm.FieldSetRow fieldSetRow4 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet3 = new Obout.SuperForm.FieldSet(); fieldSet3.ID = "FieldSet3"; fieldSet3.Title = "Billing Information"; Obout.SuperForm.FieldSet fieldSet4 = new Obout.SuperForm.FieldSet(); fieldSet4.ID = "FieldSet4"; fieldSet4.Title = "End-User Information"; fieldSetRow4.Items.Add(fieldSet3); fieldSetRow4.Items.Add(fieldSet4); Obout.SuperForm.FieldSetRow fieldSetRow5 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet commandFields = new Obout.SuperForm.FieldSet(); commandFields.ID = "CommandFields"; commandFields.HorizontalAlign = HorizontalAlign.Center; commandFields.ColumnSpan = 2; fieldSetRow5.Items.Add(commandFields); SuperForm1.FieldSets.Add(fieldSetRow2); SuperForm1.FieldSets.Add(fieldSetRow4); SuperForm1.FieldSets.Add(fieldSetRow5); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1.Fields.Add(field7); SuperForm1.Fields.Add(field8); SuperForm1.Fields.Add(dummyField); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field9); SuperForm1.Fields.Add(field10); SuperForm1.Fields.Add(field11); SuperForm1.Fields.Add(field12); SuperForm1.Fields.Add(field13); SuperForm1.Fields.Add(field14); SuperForm1.Fields.Add(field15); SuperForm1.Fields.Add(field16); SuperForm1.Fields.Add(field17); SuperForm1.Fields.Add(field18); SuperForm1.Fields.Add(field19); SuperForm1.Fields.Add(field20); SuperForm1.Fields.Add(field21); SuperForm1.Fields.Add(field22); SuperForm1.Fields.Add(field23); SuperForm1.Fields.Add(field24); SuperForm1.Fields.Add(field25); SuperForm1.Fields.Add(field26); SuperForm1.Fields.Add(field27); SuperForm1.Fields.Add(field28); SuperForm1.Fields.Add(field29); SuperForm1.Fields.Add(field30); SuperForm1.Fields.Add(field31); SuperForm1.Fields.Add(field32); SuperForm1.Fields.Add(field33); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.AutoGenerateRows = false; SuperForm1.Width = Unit.Pixel(630); SuperForm1.Title = "Payment Information"; SuperForm1.FolderStyle = "styles/black_glass"; SuperForm1.DefaultMode = DetailsViewMode.Insert; SuperForm1.ItemInserting += SuperForm1_Inserting; SuperForm1.DataBound += SuperForm1_DataBound; Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField(); field5.DataField = "CardNumber"; field5.HeaderText = "Card Number"; field5.FieldSetID = "FieldSet2"; field5.Required = true; field5.ControlStyle.Width = Unit.Pixel(150); /*MaskedEditExtender extender1 = new MaskedEditExtender(); * extender1.ID = "MaskedEditExtender1"; * extender1.Mask = "9999-9999-9999-9999"; * extender1.MessageValidatorTip = true; * extender1.MaskType = MaskedEditType.Number; * field5.Masks.Add(extender1);*/ Obout.SuperForm.DropDownListField field6 = new Obout.SuperForm.DropDownListField(); field6.DataField = "ExpirationYear"; field6.HeaderText = "Expiration Year"; field6.FieldSetID = "FieldSet2"; field6.ControlStyle.Width = 93; field6.Required = true; Obout.SuperForm.DropDownListField field7 = new Obout.SuperForm.DropDownListField(); field7.DataField = "ExpirationMonth"; field7.HeaderText = "ExpirationMonth"; field7.FieldSetID = "FieldSet2"; field7.ControlStyle.Width = 117; field7.Required = true; Obout.SuperForm.BoundField field8 = new Obout.SuperForm.BoundField(); field8.DataField = "CIN"; field8.HeaderText = "Security Code"; field8.FieldSetID = "FieldSet2"; field8.ControlStyle.Width = 83; field8.Required = true; field8.MaxLength = 3; /*FilteredTextBoxExtender numbers = new FilteredTextBoxExtender(); * numbers.FilterType = FilterTypes.Numbers; * field8.Filters.Add(numbers);*/ Obout.SuperForm.TemplateField dummyField = new Obout.SuperForm.TemplateField(); dummyField.FieldSetID = "FieldSet3"; dummyField.ItemTemplate = new DummyItemTemplate(); dummyField.ItemStyle.Width = 150; Obout.SuperForm.CheckBoxField field4 = new Obout.SuperForm.CheckBoxField(); field4.DataField = "SameAsBilling"; field4.FieldSetID = "FieldSet4"; field4.Text = "Same as the billing"; field4.FieldsToDisable = "UserCompanyName"; field4.FieldsToDisable = "UserCompanyName,UserFirstName,UserLastName,UserEmailAddress,UserAddress,UserCountryID,UserStateID,UserProvince,UserZip,UserVatID,UserPhone,UserFax"; field4.ItemStyle.Width = 150; Obout.SuperForm.BoundField field9 = new Obout.SuperForm.BoundField(); field9.DataField = "BillingCompanyName"; field9.HeaderText = "Company Name"; field9.FieldSetID = "FieldSet3"; Obout.SuperForm.BoundField field10 = new Obout.SuperForm.BoundField(); field10.DataField = "BillingFirstName"; field10.HeaderText = "First Name"; field10.FieldSetID = "FieldSet3"; field10.Required = true; Obout.SuperForm.BoundField field11 = new Obout.SuperForm.BoundField(); field11.DataField = "BillingLastName"; field11.HeaderText = "Last Name"; field11.FieldSetID = "FieldSet3"; field11.Required = true; Obout.SuperForm.BoundField field12 = new Obout.SuperForm.BoundField(); field12.DataField = "BillingEmailAddress"; field12.HeaderText = "Email Address"; field12.FieldSetID = "FieldSet3"; field12.Required = true; Obout.SuperForm.MultiLineField field13 = new Obout.SuperForm.MultiLineField(); field13.DataField = "BillingAddress"; field13.HeaderText = "Address"; field13.FieldSetID = "FieldSet3"; field13.Required = true; Obout.SuperForm.DropDownListField field14 = new Obout.SuperForm.DropDownListField(); field14.DataField = "BillingCountryID"; field14.HeaderText = "Country"; field14.FieldSetID = "FieldSet3"; field14.Required = true; field14.DataSourceID = "CountriesDataSource"; field14.DataValueField = "CountryID"; field14.DataTextField = "CountryName"; field14.Default = "219"; field14.FieldsToEnable = "BillingStateID"; field14.EnablingValues = "219"; field14.FieldsToDisable = "BillingProvince"; field14.DisablingValues = "219"; Obout.SuperForm.DropDownListField field15 = new Obout.SuperForm.DropDownListField(); field15.DataField = "BillingStateID"; field15.HeaderText = "State"; field15.FieldSetID = "FieldSet3"; field15.Required = true; field15.DataSourceID = "StatesDataSource"; field15.DataValueField = "State"; field15.DataTextField = "State"; Obout.SuperForm.BoundField field16 = new Obout.SuperForm.BoundField(); field16.DataField = "BillingProvince"; field16.FieldSetID = "FieldSet3"; Obout.SuperForm.BoundField field17 = new Obout.SuperForm.BoundField(); field17.DataField = "BillingZip"; field17.HeaderText = "Zip Code / Postal Code"; field17.FieldSetID = "FieldSet3"; Obout.SuperForm.BoundField field18 = new Obout.SuperForm.BoundField(); field18.DataField = "BillingVatID"; field18.HeaderText = "VAT Exemption ID"; field18.FieldSetID = "FieldSet3"; Obout.SuperForm.BoundField field19 = new Obout.SuperForm.BoundField(); field19.DataField = "BillingPhone"; field19.HeaderText = "Phone"; field19.FieldSetID = "FieldSet3"; /*MaskedEditExtender extender2 = new MaskedEditExtender(); * extender2.ID = "MaskedEditExtender2"; * extender2.Mask = "(999)999-9999"; * extender2.MaskType = MaskedEditType.Number; * field19.Masks.Add(extender2);*/ Obout.SuperForm.BoundField field20 = new Obout.SuperForm.BoundField(); field20.DataField = "BillingFax"; field20.HeaderText = "Fax"; field20.FieldSetID = "FieldSet3"; /*MaskedEditExtender extender3 = new MaskedEditExtender(); * extender3.ID = "MaskedEditExtender3"; * extender3.Mask = "(999)999-9999"; * extender3.MaskType = MaskedEditType.Number; * field20.Masks.Add(extender3);*/ Obout.SuperForm.BoundField field21 = new Obout.SuperForm.BoundField(); field21.DataField = "UserCompanyName"; field21.HeaderText = "Company Name"; field21.FieldSetID = "FieldSet4"; Obout.SuperForm.BoundField field22 = new Obout.SuperForm.BoundField(); field22.DataField = "UserFirstName"; field22.HeaderText = "First Name"; field22.FieldSetID = "FieldSet4"; Obout.SuperForm.BoundField field23 = new Obout.SuperForm.BoundField(); field23.DataField = "UserLastName"; field23.HeaderText = "Last Name"; field23.FieldSetID = "FieldSet4"; Obout.SuperForm.BoundField field24 = new Obout.SuperForm.BoundField(); field24.DataField = "UserEmailAddress"; field24.HeaderText = "Email Address"; field24.FieldSetID = "FieldSet4"; Obout.SuperForm.MultiLineField field25 = new Obout.SuperForm.MultiLineField(); field25.DataField = "UserAddress"; field25.HeaderText = "Address"; field25.FieldSetID = "FieldSet4"; Obout.SuperForm.DropDownListField field26 = new Obout.SuperForm.DropDownListField(); field26.DataField = "UserCountryID"; field26.HeaderText = "Country"; field26.FieldSetID = "FieldSet4"; field26.DataSourceID = "CountriesDataSource"; field26.DataValueField = "CountryID"; field26.DataTextField = "CountryName"; field26.Default = "219"; field26.FieldsToEnable = "UserStateID"; field26.EnablingValues = "219"; field26.FieldsToDisable = "UserProvince"; field26.DisablingValues = "219"; Obout.SuperForm.DropDownListField field27 = new Obout.SuperForm.DropDownListField(); field27.DataField = "UserStateID"; field27.HeaderText = "State"; field27.FieldSetID = "FieldSet4"; field27.DataSourceID = "StatesDataSource"; field27.DataValueField = "State"; field27.DataTextField = "State"; Obout.SuperForm.BoundField field28 = new Obout.SuperForm.BoundField(); field28.DataField = "UserProvince"; field28.FieldSetID = "FieldSet4"; Obout.SuperForm.BoundField field29 = new Obout.SuperForm.BoundField(); field29.DataField = "UserZip"; field29.FieldSetID = "FieldSet4"; field29.HeaderText = "Zip Code / Postal Code"; Obout.SuperForm.BoundField field30 = new Obout.SuperForm.BoundField(); field30.DataField = "UserVatID"; field30.FieldSetID = "FieldSet4"; field30.HeaderText = "VAT Exemption ID"; Obout.SuperForm.BoundField field31 = new Obout.SuperForm.BoundField(); field31.DataField = "UserPhone"; field31.FieldSetID = "FieldSet4"; field31.HeaderText = "Phone"; /*MaskedEditExtender extender4 = new MaskedEditExtender(); * extender4.ID = "MaskedEditExtender4"; * extender4.Mask = "(999)999-9999"; * extender4.MaskType = MaskedEditType.Number; * field31.Masks.Add(extender4);*/ Obout.SuperForm.BoundField field32 = new Obout.SuperForm.BoundField(); field32.DataField = "UserFax"; field32.HeaderText = "Fax"; field32.FieldSetID = "FieldSet4"; /*MaskedEditExtender extender5 = new MaskedEditExtender(); * extender5.ID = "MaskedEditExtender5"; * extender5.Mask = "(999)999-9999"; * extender5.MaskType = MaskedEditType.Number; * field32.Masks.Add(extender5);*/ Obout.SuperForm.CommandField field33 = new Obout.SuperForm.CommandField(); field33.ShowInsertButton = true; field33.InsertText = "Buy Now"; field33.ShowCancelButton = false; field33.ButtonType = ButtonType.Button; field33.ItemStyle.HorizontalAlign = HorizontalAlign.Center; field33.FieldSetID = "CommandFields"; Obout.SuperForm.FieldSetRow fieldSetRow2 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet2 = new Obout.SuperForm.FieldSet(); fieldSet2.ID = "FieldSet2"; fieldSet2.Direction = Direction.Horizontal; fieldSet2.ColumnSpan = 2; fieldSetRow2.Items.Add(fieldSet2); Obout.SuperForm.FieldSetRow fieldSetRow4 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet3 = new Obout.SuperForm.FieldSet(); fieldSet3.ID = "FieldSet3"; fieldSet3.Title = "Billing Information"; Obout.SuperForm.FieldSet fieldSet4 = new Obout.SuperForm.FieldSet(); fieldSet4.ID = "FieldSet4"; fieldSet4.Title = "End-User Information"; fieldSetRow4.Items.Add(fieldSet3); fieldSetRow4.Items.Add(fieldSet4); Obout.SuperForm.FieldSetRow fieldSetRow5 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet commandFields = new Obout.SuperForm.FieldSet(); commandFields.ID = "CommandFields"; commandFields.HorizontalAlign = HorizontalAlign.Center; commandFields.ColumnSpan = 2; fieldSetRow5.Items.Add(commandFields); SuperForm1.FieldSets.Add(fieldSetRow2); SuperForm1.FieldSets.Add(fieldSetRow4); SuperForm1.FieldSets.Add(fieldSetRow5); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1.Fields.Add(field7); SuperForm1.Fields.Add(field8); SuperForm1.Fields.Add(dummyField); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field9); SuperForm1.Fields.Add(field10); SuperForm1.Fields.Add(field11); SuperForm1.Fields.Add(field12); SuperForm1.Fields.Add(field13); SuperForm1.Fields.Add(field14); SuperForm1.Fields.Add(field15); SuperForm1.Fields.Add(field16); SuperForm1.Fields.Add(field17); SuperForm1.Fields.Add(field18); SuperForm1.Fields.Add(field19); SuperForm1.Fields.Add(field20); SuperForm1.Fields.Add(field21); SuperForm1.Fields.Add(field22); SuperForm1.Fields.Add(field23); SuperForm1.Fields.Add(field24); SuperForm1.Fields.Add(field25); SuperForm1.Fields.Add(field26); SuperForm1.Fields.Add(field27); SuperForm1.Fields.Add(field28); SuperForm1.Fields.Add(field29); SuperForm1.Fields.Add(field30); SuperForm1.Fields.Add(field31); SuperForm1.Fields.Add(field32); SuperForm1.Fields.Add(field33); SuperForm1Container.Controls.Add(SuperForm1); }
protected void DataBindRowEditTemplate(Object sender, EventArgs e) { PlaceHolder oPH1 = sender as PlaceHolder; Obout.Grid.TemplateContainer oContainer = oPH1.NamingContainer as Obout.Grid.TemplateContainer; Literal hiddenInput = new Literal(); hiddenInput.Text = "<input type=\"hidden\" id=\"OrderID\" />"; SuperForm SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.DataSourceID = "SqlDataSource2"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = false; SuperForm1.AutoGenerateEditButton = false; SuperForm1.AutoGenerateDeleteButton = false; SuperForm1.AutoGenerateDateFields = true; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.Width = Unit.Percentage(99); SuperForm1.DefaultMode = DetailsViewMode.Insert; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "OrderID"; field1.HeaderText = "Order ID"; field1.ReadOnly = true; field1.InsertVisible = false; field1.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ShipName"; field2.HeaderText = "Ship Name"; field2.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "ShipAddress"; field3.HeaderText = "Ship Address"; field3.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "ShipCity"; field4.HeaderText = "Ship City"; field4.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField(); field5.DataField = "ShipRegion"; field5.HeaderText = "Ship Region"; field5.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field6 = new Obout.SuperForm.BoundField(); field6.DataField = "ShipPostalCode"; field6.HeaderText = "Zip Code"; field6.FieldSetID = "FieldSet1"; Obout.SuperForm.DropDownListField field7 = new Obout.SuperForm.DropDownListField(); field7.DataField = "ShipCountry"; field7.HeaderText = "Ship Country"; field7.FieldSetID = "FieldSet1"; field7.DataSourceID = "SqlDataSource3"; Obout.SuperForm.DateField field8 = new Obout.SuperForm.DateField(); field8.DataField = "OrderDate"; field8.HeaderText = "Order Date"; field8.FieldSetID = "FieldSet2"; field8.DataFormatString = "{0:MM/dd/yyyy}"; field8.ApplyFormatInEditMode = true; Obout.SuperForm.DateField field9 = new Obout.SuperForm.DateField(); field9.DataField = "RequiredDate"; field9.HeaderText = "Required Date"; field9.FieldSetID = "FieldSet2"; field9.DataFormatString = "{0:MM/dd/yyyy}"; field9.ApplyFormatInEditMode = true; Obout.SuperForm.DateField field10 = new Obout.SuperForm.DateField(); field10.DataField = "ShippedDate"; field10.HeaderText = "Shipped Date"; field10.FieldSetID = "FieldSet2"; field10.DataFormatString = "{0:MM/dd/yyyy}"; field10.ApplyFormatInEditMode = true; Obout.SuperForm.BoundField field11 = new Obout.SuperForm.BoundField(); field11.DataField = "ShipVia"; field11.HeaderText = "Ship Via"; field11.FieldSetID = "FieldSet2"; Obout.SuperForm.CheckBoxField field12 = new Obout.SuperForm.CheckBoxField(); field12.DataField = "Sent"; field12.HeaderText = "Sent"; field12.FieldSetID = "FieldSet2"; Obout.SuperForm.MultiLineField field13 = new Obout.SuperForm.MultiLineField(); field13.DataField = "AdditionalInformation"; field13.HeaderText = "Additional Information"; field13.FieldSetID = "FieldSet3"; field13.HeaderStyle.Width = 1; Obout.SuperForm.TemplateField field14 = new Obout.SuperForm.TemplateField(); field14.FieldSetID = "FieldSet4"; field14.EditItemTemplate = new ButtonsEditItemTemplate(); Obout.SuperForm.FieldSetRow fieldSetRow1 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet1 = new Obout.SuperForm.FieldSet(); fieldSet1.ID = "FieldSet1"; fieldSet1.Title = "Ship Information"; Obout.SuperForm.FieldSet fieldSet2 = new Obout.SuperForm.FieldSet(); fieldSet2.ID = "FieldSet2"; fieldSet2.Title = "Order Information"; Obout.SuperForm.FieldSet fieldSet3 = new Obout.SuperForm.FieldSet(); fieldSet3.ID = "FieldSet3"; fieldSet3.Title = "Additional Information"; fieldSetRow1.Items.Add(fieldSet1); fieldSetRow1.Items.Add(fieldSet2); fieldSetRow1.Items.Add(fieldSet3); Obout.SuperForm.FieldSetRow fieldSetRow2 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet4 = new Obout.SuperForm.FieldSet(); fieldSet4.ID = "FieldSet4"; fieldSet4.ColumnSpan= 3; fieldSet4.CssClass="command-row"; fieldSetRow2.Items.Add(fieldSet4); SuperForm1.FieldSets.Add(fieldSetRow1); SuperForm1.FieldSets.Add(fieldSetRow2); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1.Fields.Add(field7); SuperForm1.Fields.Add(field8); SuperForm1.Fields.Add(field9); SuperForm1.Fields.Add(field10); SuperForm1.Fields.Add(field11); SuperForm1.Fields.Add(field12); SuperForm1.Fields.Add(field13); SuperForm1.Fields.Add(field14); oPH1.Controls.Add(hiddenInput); oPH1.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Order Details"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.AllowDataKeysInsert = false; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Insert; SuperForm1.EnableModelValidation = true; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "OrderID"; field1.HeaderText = "Order ID"; field1.ReadOnly = true; field1.InsertVisible = true; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ShipName"; field2.HeaderText = "Ship Name"; Obout.SuperForm.DateField field3 = new Obout.SuperForm.DateField(); field3.DataField = "OrderDate"; field3.HeaderText = "Order Date"; field3.DataFormatString = "{0:MM/dd/yyyy}"; field3.ApplyFormatInEditMode = true; Obout.SuperForm.DateField field4 = new Obout.SuperForm.DateField(); field4.DataField = "ShippedDate"; field4.HeaderText = "Shipped Date"; field4.DataFormatString = "{0:MM/dd/yyyy}"; field4.ApplyFormatInEditMode = true; Obout.SuperForm.DateField field5 = new Obout.SuperForm.DateField(); field5.DataField = "RequiredDate"; field5.HeaderText = "Required Date"; field5.DataFormatString = "{0:MM/dd/yyyy}"; field5.ApplyFormatInEditMode = true; SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1Container.Controls.Add(SuperForm1); SuperForm1.DataBind(); if (SuperForm1.CurrentMode == DetailsViewMode.Edit || SuperForm1.CurrentMode == DetailsViewMode.Insert) { OboutInc.Calendar2.Calendar orderDateCalendar = (OboutInc.Calendar2.Calendar)(SuperForm1.Rows[2].Cells[1].Controls[0].Controls[1].Controls[0]); orderDateCalendar.CultureName = ListBox1.SelectedValue; OboutInc.Calendar2.Calendar shippedDateCalendar = (OboutInc.Calendar2.Calendar)(SuperForm1.Rows[3].Cells[1].Controls[0].Controls[1].Controls[0]); shippedDateCalendar.CultureName = ListBox1.SelectedValue; OboutInc.Calendar2.Calendar requiredDateCalendar = (OboutInc.Calendar2.Calendar)(SuperForm1.Rows[4].Cells[1].Controls[0].Controls[1].Controls[0]); requiredDateCalendar.CultureName = ListBox1.SelectedValue; } }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.DataKeyNames = new string[] { "EmployeeID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Insert; SuperForm1.ItemInserted += SuperForm1_ItemInserted; SuperForm1.ItemCommand += SuperForm1_ItemCommand; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "EmployeeID"; field1.HeaderText = "Employee ID"; field1.ReadOnly = true; field1.InsertVisible = false; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "FirstName"; field2.HeaderText = "First Name"; field2.Required = true; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "LastName"; field3.HeaderText = "Last Name"; field3.Required = true; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "BirthDate"; field4.HeaderText = "Birth Date"; field4.DataFormatString = "{0:MM/dd/yyyy}"; field4.ApplyFormatInEditMode = true; field4.Required = true; MaskedEditExtender extender1 = new MaskedEditExtender(); extender1.ID = "MaskedEditExtender1"; extender1.Mask = "99/99/9999"; extender1.MaskType = MaskedEditType.Date; field4.Masks.Add(extender1); Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField(); field5.DataField = "HireDate"; field5.HeaderText = "Hire Date"; field5.DataFormatString = "{0:MM/dd/yyyy}"; field5.ApplyFormatInEditMode = true; field5.Required = true; MaskedEditExtender extender2 = new MaskedEditExtender(); extender2.ID = "MaskedEditExtender2"; extender2.Mask = "99/99/9999"; extender2.MaskType = MaskedEditType.Date; field5.Masks.Add(extender2); Obout.SuperForm.BoundField field6 = new Obout.SuperForm.BoundField(); field6.DataField = "Salary"; field6.HeaderText = "Salary"; field6.Required = true; MaskedEditExtender extender3 = new MaskedEditExtender(); extender3.ID = "MaskedEditExtender3"; extender3.Mask = "9,999,9999"; extender3.MaskType = MaskedEditType.Number; extender3.InputDirection = MaskedEditInputDirection.RightToLeft; field6.Masks.Add(extender3); Obout.SuperForm.BoundField field7 = new Obout.SuperForm.BoundField(); field7.DataField = "HomePhone"; field7.HeaderText = "Home Phone"; MaskedEditExtender extender4 = new MaskedEditExtender(); extender4.ID = "MaskedEditExtender4"; extender4.Mask = "(999)999-9999"; extender4.MaskType = MaskedEditType.Number; field7.Masks.Add(extender4); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1.Fields.Add(field7); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Order Details"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateDateFields = true; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; Obout.SuperForm.BoundField field11 = new Obout.SuperForm.BoundField(); field11.DataField = "OrderID"; field11.HeaderText = "Order ID"; field11.ReadOnly = true; field11.InsertVisible = false; Obout.SuperForm.BoundField field12 = new Obout.SuperForm.BoundField(); field12.DataField = "ShipName"; field12.HeaderText = "Ship Name"; Obout.SuperForm.BoundField field13 = new Obout.SuperForm.BoundField(); field13.DataField = "ShipCity"; field13.HeaderText = "Ship City"; Obout.SuperForm.BoundField field14 = new Obout.SuperForm.BoundField(); field14.DataField = "ShipCountry"; field14.HeaderText = "Ship Country"; Obout.SuperForm.CommandField field15 = new Obout.SuperForm.CommandField(); field15.ButtonType = ButtonType.Button; field15.ShowEditButton = true; field15.ShowDeleteButton = true; field15.ShowInsertButton = true; SuperForm1.Fields.Add(field11); SuperForm1.Fields.Add(field12); SuperForm1.Fields.Add(field13); SuperForm1.Fields.Add(field14); SuperForm1.Fields.Add(field15); SuperForm1Container.Controls.Add(SuperForm1); SuperForm2 = new SuperForm(); SuperForm2.ID = "SuperForm2"; SuperForm2.Title = "Order Details"; SuperForm2.DataSourceID = "SqlDataSource1"; SuperForm2.AutoGenerateRows = false; SuperForm2.AutoGenerateDateFields = true; SuperForm2.DataKeyNames = new string[] { "OrderID" }; SuperForm2.AllowPaging = true; SuperForm2.DefaultMode = DetailsViewMode.Edit; Obout.SuperForm.BoundField field21 = new Obout.SuperForm.BoundField(); field21.DataField = "OrderID"; field21.HeaderText = "Order ID"; field21.ReadOnly = true; field21.InsertVisible = false; Obout.SuperForm.BoundField field22 = new Obout.SuperForm.BoundField(); field22.DataField = "ShipName"; field22.HeaderText = "Ship Name"; Obout.SuperForm.BoundField field23 = new Obout.SuperForm.BoundField(); field23.DataField = "ShipCity"; field23.HeaderText = "Ship City"; Obout.SuperForm.BoundField field24 = new Obout.SuperForm.BoundField(); field24.DataField = "ShipCountry"; field24.HeaderText = "Ship Country"; Obout.SuperForm.CommandField field25 = new Obout.SuperForm.CommandField(); field25.ButtonType = ButtonType.Link; field25.ShowEditButton = true; field25.ShowDeleteButton = true; field25.ShowInsertButton = true; SuperForm2.Fields.Add(field21); SuperForm2.Fields.Add(field22); SuperForm2.Fields.Add(field23); SuperForm2.Fields.Add(field24); SuperForm2.Fields.Add(field25); SuperForm2Container.Controls.Add(SuperForm2); SuperForm3 = new SuperForm(); SuperForm3.ID = "SuperForm3"; SuperForm3.Title = "Order Details"; SuperForm3.DataSourceID = "SqlDataSource1"; SuperForm3.AutoGenerateRows = false; SuperForm3.AutoGenerateDateFields = true; SuperForm3.DataKeyNames = new string[] { "OrderID" }; SuperForm3.AllowPaging = true; SuperForm3.DefaultMode = DetailsViewMode.Edit; Obout.SuperForm.BoundField field31 = new Obout.SuperForm.BoundField(); field31.DataField = "OrderID"; field31.HeaderText = "Order ID"; field31.ReadOnly = true; field31.InsertVisible = false; Obout.SuperForm.BoundField field32 = new Obout.SuperForm.BoundField(); field32.DataField = "ShipName"; field32.HeaderText = "Ship Name"; Obout.SuperForm.BoundField field33 = new Obout.SuperForm.BoundField(); field33.DataField = "ShipCity"; field33.HeaderText = "Ship City"; Obout.SuperForm.BoundField field34 = new Obout.SuperForm.BoundField(); field34.DataField = "ShipCountry"; field34.HeaderText = "Ship Country"; Obout.SuperForm.CommandField field35 = new Obout.SuperForm.CommandField(); field35.ButtonType = ButtonType.Image; field35.ShowEditButton = true; field35.ShowDeleteButton = true; field35.ShowInsertButton = true; field35.EditImageUrl = "resources/icons/Edit.png"; field35.DeleteImageUrl = "resources/icons/Delete.png"; field35.NewImageUrl = "resources/icons/Add.png"; field35.InsertImageUrl = "resources/icons/Save.png"; field35.UpdateImageUrl = "resources/icons/Save.png"; field35.CancelImageUrl = "resources/icons/Delete.png"; SuperForm3.Fields.Add(field31); SuperForm3.Fields.Add(field32); SuperForm3.Fields.Add(field33); SuperForm3.Fields.Add(field34); SuperForm3.Fields.Add(field35); SuperForm3Container.Controls.Add(SuperForm3); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Order Details"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.AllowPaging = true; SuperForm1.AllowDataKeysInsert = false; SuperForm1.EnableModelValidation = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; SuperForm1.ModeChanged += SuperForm1_ModeChanged; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "OrderID"; field1.HeaderText = "Order ID"; field1.ReadOnly = true; field1.InsertVisible = false; field1.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ShipName"; field2.HeaderText = "Ship Name"; field2.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "ShipCity"; field3.HeaderText = "Ship City"; field3.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "ShipCountry"; field4.HeaderText = "Ship Country"; field4.FieldSetID = "FieldSet1"; Obout.SuperForm.CommandField field5 = new Obout.SuperForm.CommandField(); field5.ButtonType = ButtonType.Button; field5.ShowEditButton = true; field5.ShowDeleteButton = true; field5.ShowInsertButton = true; field5.FieldSetID = "FieldSet2"; Obout.SuperForm.FieldSetRow fieldSetRow1 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet1 = new Obout.SuperForm.FieldSet(); fieldSet1.ID = "FieldSet1"; fieldSetRow1.Items.Add(fieldSet1); Obout.SuperForm.FieldSetRow fieldSetRow2 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet2 = new Obout.SuperForm.FieldSet(); fieldSet2.ID = "FieldSet2"; fieldSet2.HorizontalAlign = HorizontalAlign.NotSet; fieldSet2.CssClass = "hidden-buttons"; fieldSetRow2.Items.Add(fieldSet2); SuperForm1.FieldSets.Add(fieldSetRow1); SuperForm1.FieldSets.Add(fieldSetRow2); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1Container.Controls.Add(SuperForm1); if (!IsPostBack) { UpdateButtonsState(); } }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Add a new order"; SuperForm1.AutoGenerateRows = false; SuperForm1.DefaultMode = DetailsViewMode.Insert; SuperForm1.ItemInserting += SuperForm1_Inserting; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "ShipName"; field1.HeaderText = "Ship Name"; field1.Required = true; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ShipCity"; field2.HeaderText = "Ship City"; field2.Required = true; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "ShipRegion"; field3.HeaderText = "Ship Region"; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "ShipCountry"; field4.HeaderText = "Ship Country"; field4.Required = true; Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField(); field5.DataField = "ShipPostalCode"; field5.HeaderText = "Ship Postal Code"; Obout.SuperForm.DateField field6 = new Obout.SuperForm.DateField(); field6.DataField = "OrderDate"; field6.HeaderText = "Order Date"; field6.Required = true; Obout.SuperForm.CheckBoxField field7 = new Obout.SuperForm.CheckBoxField(); field7.DataField = "Sent"; field7.HeaderText = "Sent"; Obout.SuperForm.CommandField field8 = new Obout.SuperForm.CommandField(); field8.ShowInsertButton = true; field8.ShowCancelButton = false; field8.ButtonType = ButtonType.Button; field8.ItemStyle.HorizontalAlign = HorizontalAlign.Center; SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1.Fields.Add(field7); SuperForm1.Fields.Add(field8); SuperForm1Container.Controls.Add(SuperForm1); if (!IsPostBack) { SuperForm1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; SuperForm1.Width = Unit.Pixel(600); Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "OrderID"; field1.HeaderText = "Order ID"; field1.ReadOnly = true; field1.InsertVisible = false; field1.FieldSetID = "FieldSet2"; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ShipName"; field2.HeaderText = "Ship Name"; field2.FieldSetID = "FieldSet2"; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "ShipCity"; field3.HeaderText = "Ship City"; field3.FieldSetID = "FieldSet2"; Obout.SuperForm.DateField field4 = new Obout.SuperForm.DateField(); field4.DataField = "OrderDate"; field4.HeaderText = "Order Date"; field4.DataFormatString = "{0:MM/dd/yyyy}"; field4.ApplyFormatInEditMode = true; field4.FieldSetID = "FieldSet3"; Obout.SuperForm.DateField field5 = new Obout.SuperForm.DateField(); field5.DataField = "ShippedDate"; field5.HeaderText = "Shipped Date"; field5.DataFormatString = "{0:MM/dd/yyyy}"; field5.ApplyFormatInEditMode = true; field5.FieldSetID = "FieldSet3"; Obout.SuperForm.DateField field6 = new Obout.SuperForm.DateField(); field6.DataField = "RequiredDate"; field6.HeaderText = "Required Date"; field6.DataFormatString = "{0:MM/dd/yyyy}"; field6.ApplyFormatInEditMode = true; field6.FieldSetID = "FieldSet3"; SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); Obout.SuperForm.FieldSetRow row2 = new Obout.SuperForm.FieldSetRow(); FieldSet fieldSet2 = new FieldSet(); fieldSet2.ID = "FieldSet2"; fieldSet2.CssClass = "field-set"; fieldSet2.Title = "Shipping Information"; FieldSet fieldSet3 = new FieldSet(); fieldSet3.ID = "FieldSet3"; fieldSet3.CssClass = "field-set"; fieldSet3.Title = "Timeline Information"; row2.Items.Add(fieldSet2); row2.Items.Add(fieldSet3); SuperForm1.FieldSets.Add(row2); SuperForm1Container.Controls.Add(SuperForm1); }
void Page_load(object sender, EventArgs e) { grid1 = new Grid(); grid1.ID = "Grid1"; grid1.DataSourceID = "SqlDataSource1"; grid1.Serialize = false; grid1.AutoGenerateColumns = false; grid1.ClientSideEvents.OnBeforeClientEdit = "Grid1_ClientEdit"; grid1.ClientSideEvents.OnBeforeClientAdd = "Grid1_ClientAdd"; grid1.ClientSideEvents.ExposeSender = true; // creating the columns Column oCol1 = new Column(); oCol1.ID = "Column1"; oCol1.DataField = "OrderID"; oCol1.ReadOnly = true; oCol1.HeaderText = "ORDER ID"; oCol1.Width = "150"; oCol1.Visible = false; Column oCol2 = new Column(); oCol2.ID = "Column2"; oCol2.DataField = "ShipName"; oCol2.HeaderText = "NAME"; oCol2.Width = "200"; Column oCol3 = new Column(); oCol3.ID = "Column3"; oCol3.DataField = "ShipAddress"; oCol3.Visible = false; oCol3.HeaderText = "ADDRESS"; oCol3.Width = "125"; Column oCol4 = new Column(); oCol4.ID = "Column4"; oCol4.DataField = "ShipCity"; oCol4.HeaderText = "CITY"; oCol4.Width = "150"; Column oCol5 = new Column(); oCol5.ID = "Column5"; oCol5.DataField = "ShipRegion"; oCol5.Visible = false; oCol5.HeaderText = "REGION"; oCol5.Width = "150"; Column oCol6 = new Column(); oCol6.ID = "Column6"; oCol6.DataField = "ShipPostalCode"; oCol6.HeaderText = "POSTAL CODE"; oCol6.Width = "150"; Column oCol7 = new Column(); oCol7.ID = "Column7"; oCol7.DataField = "ShipCountry"; oCol7.HeaderText = "COUNTRY"; oCol7.Width = "125"; Column oCol8 = new Column(); oCol8.ID = "Column8"; oCol8.DataField = "OrderDate"; oCol8.HeaderText = "ORDER DATE"; oCol8.Width = "125"; oCol8.DataFormatString = "{0:MM/dd/yyyy}"; oCol8.ApplyFormatInEditMode = true; Column oCol9 = new Column(); oCol9.ID = "Column9"; oCol9.DataField = "RequiredDate"; oCol9.Visible = false; oCol9.HeaderText = "REQUIRED DATE"; oCol9.ApplyFormatInEditMode = true; oCol9.DataFormatString = "{0:MM/dd/yyyy}"; oCol9.Width = "200"; Column oCol10 = new Column(); oCol10.ID = "Column10"; oCol10.DataField = "ShippedDate"; oCol10.Visible = false; oCol10.ApplyFormatInEditMode = true; oCol10.DataFormatString = "{0:MM/dd/yyyy}"; oCol10.HeaderText = "SHIPPED DATE"; oCol10.Width = "200"; Column oCol11 = new Column(); oCol11.ID = "Column11"; oCol11.DataField = "ShipVia"; oCol11.Visible = false; oCol11.HeaderText = "SHIP VIA"; oCol11.Width = "200"; Column oCol12 = new Column(); oCol12.ID = "Column12"; oCol12.DataField = "Sent"; oCol12.Visible = false; oCol12.HeaderText = "SENT"; oCol12.Width = "175"; Column oCol13 = new Column(); oCol13.DataField = ""; oCol13.ID = "Column12"; oCol13.HeaderText = "EDIT"; oCol13.Width = "150"; oCol13.AllowEdit = true; oCol13.AllowDelete = true; // add the columns to the Columns collection of the grid grid1.Columns.Add(oCol1); grid1.Columns.Add(oCol2); grid1.Columns.Add(oCol3); grid1.Columns.Add(oCol4); grid1.Columns.Add(oCol5); grid1.Columns.Add(oCol6); grid1.Columns.Add(oCol7); grid1.Columns.Add(oCol8); grid1.Columns.Add(oCol9); grid1.Columns.Add(oCol10); grid1.Columns.Add(oCol11); grid1.Columns.Add(oCol12); grid1.Columns.Add(oCol13); // add the grid to the controls collection of the PlaceHolder Grid1Container.Controls.Add(grid1); window1 = new Window(); window1.ID = "Window1"; window1.IsModal = true; window1.ShowCloseButton = true; window1.Status = ""; window1.RelativeElementID = "WindowPositionHelper"; window1.Top = -25; window1.Left = 100; window1.Height = 370; window1.Width = 551; window1.VisibleOnLoad = false; window1.StyleFolder = "../window/wdstyles/blue"; window1.Title = "Add / Edit Record"; SuperForm1Container.Controls.Add(window1); Literal hiddenInput = new Literal(); hiddenInput.Text = "<input type=\"hidden\" id=\"OrderID\" />"; window1.Controls.Add(hiddenInput); PlaceHolder superFormPlaceHolder = new PlaceHolder(); window1.Controls.Add(superFormPlaceHolder); Literal div1 = new Literal(); div1.Text = "<div class=\"super-form\" >"; superFormPlaceHolder.Controls.Add(div1); SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Width = 525; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = false; SuperForm1.AutoGenerateEditButton = false; SuperForm1.AutoGenerateDeleteButton = false; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.DefaultMode = DetailsViewMode.Insert; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "ShipName"; field1.HeaderText = "Ship Name"; field1.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ShipAddress"; field2.HeaderText = "Ship Address"; field2.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "ShipCity"; field3.HeaderText = "Ship City"; field3.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "ShipRegion"; field4.HeaderText = "Ship Region"; field4.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField(); field5.DataField = "ShipPostalCode"; field5.HeaderText = "Zip Code"; field5.FieldSetID = "FieldSet1"; Obout.SuperForm.DropDownListField field6 = new Obout.SuperForm.DropDownListField(); field6.DataField = "ShipCountry"; field6.HeaderText = "Ship Country"; field6.FieldSetID = "FieldSet1"; field6.DataSourceID = "SqlDataSource3"; Obout.SuperForm.DateField field7 = new Obout.SuperForm.DateField(); field7.DataField = "OrderDate"; field7.HeaderText = "Order Date"; field7.FieldSetID = "FieldSet2"; field7.DataFormatString = "{0:MM/dd/yyyy}"; field7.ApplyFormatInEditMode = true; Obout.SuperForm.DateField field8 = new Obout.SuperForm.DateField(); field8.DataField = "RequiredDate"; field8.HeaderText = "Required Date"; field8.FieldSetID = "FieldSet2"; field8.DataFormatString = "{0:MM/dd/yyyy}"; field8.ApplyFormatInEditMode = true; Obout.SuperForm.DateField field9 = new Obout.SuperForm.DateField(); field9.DataField = "ShippedDate"; field9.HeaderText = "Shipped Date"; field9.FieldSetID = "FieldSet2"; field9.DataFormatString = "{0:MM/dd/yyyy}"; field9.ApplyFormatInEditMode = true; Obout.SuperForm.DateField field10 = new Obout.SuperForm.DateField(); field10.DataField = "ShipVia"; field10.HeaderText = "Ship Via"; field10.FieldSetID = "FieldSet2"; Obout.SuperForm.CheckBoxField field11 = new Obout.SuperForm.CheckBoxField(); field11.DataField = "Sent"; field11.HeaderText = "Sent"; field11.FieldSetID = "FieldSet2"; Obout.SuperForm.TemplateField field12 = new Obout.SuperForm.TemplateField(); field12.FieldSetID = "FieldSet4"; field12.EditItemTemplate = new AddButtonsItemTemplate(); Obout.SuperForm.FieldSetRow fieldSetRow1 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet1 = new Obout.SuperForm.FieldSet(); fieldSet1.ID = "FieldSet1"; fieldSet1.Title = "Ship Information"; Obout.SuperForm.FieldSet fieldSet2 = new Obout.SuperForm.FieldSet(); fieldSet2.ID = "FieldSet2"; fieldSet2.Title = "Order Information"; fieldSetRow1.Items.Add(fieldSet1); fieldSetRow1.Items.Add(fieldSet2); Obout.SuperForm.FieldSetRow fieldSetRow2 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet4 = new Obout.SuperForm.FieldSet(); fieldSet4.ID = "FieldSet4"; fieldSet4.ColumnSpan = 2; fieldSet4.CssClass = "command-row"; fieldSetRow2.Items.Add(fieldSet4); SuperForm1.FieldSets.Add(fieldSetRow1); SuperForm1.FieldSets.Add(fieldSetRow2); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1.Fields.Add(field7); SuperForm1.Fields.Add(field8); SuperForm1.Fields.Add(field9); SuperForm1.Fields.Add(field10); SuperForm1.Fields.Add(field11); SuperForm1.Fields.Add(field12); superFormPlaceHolder.Controls.Add(SuperForm1); Literal div2 = new Literal(); div2.Text = "</div>"; superFormPlaceHolder.Controls.Add(div2); window1.Controls.Add(hiddenInput); }
public void CreatetplRowEdit(Object sender, Obout.Grid.GridRuntimeTemplateEventArgs e) { PlaceHolder ph1 = new PlaceHolder(); e.Container.Controls.Add(ph1); Literal inputText = new Literal(); inputText.Text = "<input type=\"hidden\" id=\"OrderID\" />"; ValidationSummary validateGroup1 = new ValidationSummary(); validateGroup1.ID = "ValidationSummary1"; validateGroup1.ValidationGroup = "Group1"; ph1.Controls.Add(inputText); ph1.Controls.Add(validateGroup1); SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = false; SuperForm1.AutoGenerateEditButton = false; SuperForm1.AutoGenerateDeleteButton = false; SuperForm1.ValidationGroup = "Group1"; SuperForm1.Width = Unit.Percentage(99); SuperForm1.DataKeyNames = new string[] { "Order ID" }; SuperForm1.DefaultMode = DetailsViewMode.Insert; RequiredFieldValidator requiredFieldValidator1 = new RequiredFieldValidator(); requiredFieldValidator1.ID = "RequiredFieldValidator1"; requiredFieldValidator1.Display = ValidatorDisplay.Dynamic; requiredFieldValidator1.ErrorMessage = "Ship Name is mandatory"; requiredFieldValidator1.Text = "*"; requiredFieldValidator1.ValidationGroup = "Group1"; RequiredFieldValidator requiredFieldValidator2 = new RequiredFieldValidator(); requiredFieldValidator2.ID = "RequiredFieldValidator2"; requiredFieldValidator2.Display = ValidatorDisplay.Dynamic; requiredFieldValidator2.ErrorMessage = "Ship Address is mandatory"; requiredFieldValidator2.Text = "*"; requiredFieldValidator2.ValidationGroup = "Group1"; RequiredFieldValidator requiredFieldValidator3 = new RequiredFieldValidator(); requiredFieldValidator3.ID = "RequiredFieldValidator3"; requiredFieldValidator3.Display = ValidatorDisplay.Dynamic; requiredFieldValidator3.ErrorMessage = "Ship City is mandatory"; requiredFieldValidator3.Text = "*"; requiredFieldValidator3.ValidationGroup = "Group1"; RequiredFieldValidator requiredFieldValidator4 = new RequiredFieldValidator(); requiredFieldValidator4.ID = "RequiredFieldValidator4"; requiredFieldValidator4.Display = ValidatorDisplay.Dynamic; requiredFieldValidator4.ErrorMessage = "Ship Country is mandatory"; requiredFieldValidator4.Text = "*"; requiredFieldValidator4.ValidationGroup = "Group1"; RequiredFieldValidator requiredFieldValidator5 = new RequiredFieldValidator(); requiredFieldValidator5.ID = "RequiredFieldValidator5"; requiredFieldValidator5.Display = ValidatorDisplay.Dynamic; requiredFieldValidator5.ErrorMessage = "Order Date is mandatory"; requiredFieldValidator5.Text = "*"; requiredFieldValidator5.ValidationGroup = "Group1"; RangeValidator rangeValidator1 = new RangeValidator(); rangeValidator1.ID = "RangeValidator1"; rangeValidator1.Display = ValidatorDisplay.Dynamic; rangeValidator1.MinimumValue = "1900/1/1"; rangeValidator1.MaximumValue = "2039/12/31"; rangeValidator1.Type = ValidationDataType.Date; rangeValidator1.ErrorMessage = "Order Date needs to be in this format: mm/dd/yyyy"; rangeValidator1.Text = "*"; rangeValidator1.ValidationGroup = "Group1"; RequiredFieldValidator requiredFieldValidator6 = new RequiredFieldValidator(); requiredFieldValidator6.ID = "RequiredFieldValidator6"; requiredFieldValidator6.Display = ValidatorDisplay.Dynamic; requiredFieldValidator6.ErrorMessage = "Required Date is mandatory"; requiredFieldValidator6.Text = "*"; requiredFieldValidator6.ValidationGroup = "Group1"; RangeValidator rangeValidator2 = new RangeValidator(); rangeValidator2.ID = "RangeValidator2"; rangeValidator2.Display = ValidatorDisplay.Dynamic; rangeValidator2.MinimumValue = "1900/1/1"; rangeValidator2.MaximumValue = "2039/12/31"; rangeValidator2.Type = ValidationDataType.Date; rangeValidator2.ErrorMessage = "Required Date needs to be in this format: mm/dd/yyyy"; rangeValidator2.Text = "*"; rangeValidator2.ValidationGroup = "Group1"; RequiredFieldValidator requiredFieldValidator7 = new RequiredFieldValidator(); requiredFieldValidator7.ID = "RequiredFieldValidator7"; requiredFieldValidator7.Display = ValidatorDisplay.Dynamic; requiredFieldValidator7.ErrorMessage = "Shipped Date is mandatory"; requiredFieldValidator7.Text = "*"; requiredFieldValidator7.ValidationGroup = "Group1"; RangeValidator rangeValidator3 = new RangeValidator(); rangeValidator3.ID = "RangeValidator3"; rangeValidator3.Display = ValidatorDisplay.Dynamic; rangeValidator3.MinimumValue = "1900/1/1"; rangeValidator3.MaximumValue = "2039/12/31"; rangeValidator3.Type = ValidationDataType.Date; rangeValidator3.ErrorMessage = "Shipped Date needs to be in this format: mm/dd/yyyy"; rangeValidator3.Text = "*"; rangeValidator3.ValidationGroup = "Group1"; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "ShipName"; field1.HeaderText = "Ship Name"; field1.FieldSetID = "FieldSet1"; field1.Validators.Add(requiredFieldValidator1); Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ShipAddress"; field2.HeaderText = "Ship Address"; field2.FieldSetID = "FieldSet1"; field2.Validators.Add(requiredFieldValidator2); Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "ShipCity"; field3.HeaderText = "Ship City"; field3.FieldSetID = "FieldSet1"; field3.Validators.Add(requiredFieldValidator3); Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "ShipRegion"; field4.HeaderText = "Ship Region"; field4.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField(); field5.DataField = "ShipPostalCode"; field5.HeaderText = "Zip Cod"; field5.FieldSetID = "FieldSet1"; Obout.SuperForm.DropDownListField field6 = new Obout.SuperForm.DropDownListField(); field6.DataField = "ShipCountry"; field6.HeaderText = "Ship Country"; field6.FieldSetID = "FieldSet1"; field6.DataSourceID = "SqlDataSource3"; field6.Validators.Add(requiredFieldValidator4); Obout.SuperForm.DateField field7 = new Obout.SuperForm.DateField(); field7.DataField = "OrderDate"; field7.HeaderText = "Order Date"; field7.FieldSetID = "FieldSet2"; field7.DataFormatString = "{0:MM/dd/yyyy}"; field7.ApplyFormatInEditMode = true; field7.Validators.Add(requiredFieldValidator5); field7.Validators.Add(rangeValidator1); Obout.SuperForm.DateField field8 = new Obout.SuperForm.DateField(); field8.DataField = "RequiredDate"; field8.HeaderText = "Required Date"; field8.FieldSetID = "FieldSet2"; field8.DataFormatString = "{0:MM/dd/yyyy}"; field8.ApplyFormatInEditMode = true; field8.Validators.Add(requiredFieldValidator6); field8.Validators.Add(rangeValidator2); Obout.SuperForm.DateField field9 = new Obout.SuperForm.DateField(); field9.DataField = "ShippedDate"; field9.HeaderText = "Shipped Date"; field9.FieldSetID = "FieldSet2"; field9.DataFormatString = "{0:MM/dd/yyyy}"; field9.ApplyFormatInEditMode = true; field9.Validators.Add(requiredFieldValidator7); field9.Validators.Add(rangeValidator3); Obout.SuperForm.BoundField field10 = new Obout.SuperForm.BoundField(); field10.DataField = "ShipVia"; field10.HeaderText = "Ship Via"; field10.FieldSetID = "FieldSet2"; Obout.SuperForm.CheckBoxField field11 = new Obout.SuperForm.CheckBoxField(); field11.DataField = "Sent"; field11.HeaderText = "Sent"; field11.FieldSetID = "FieldSet2"; Obout.SuperForm.MultiLineField field12 = new Obout.SuperForm.MultiLineField(); field12.DataField = "AdditionalInformation"; field12.HeaderText = ""; field12.FieldSetID = "FieldSet3"; field12.HeaderStyle.Width = 1; Obout.SuperForm.TemplateField field13 = new Obout.SuperForm.TemplateField(); field13.FieldSetID = "FieldSet4"; field13.EditItemTemplate = new btnUpdateEditItemTemplate(); Obout.SuperForm.FieldSetRow fieldSetRow1 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet1 = new Obout.SuperForm.FieldSet(); fieldSet1.ID = "FieldSet1"; fieldSet1.Title = "Ship Information"; fieldSetRow1.Items.Add(fieldSet1); Obout.SuperForm.FieldSet fieldSet2 = new Obout.SuperForm.FieldSet(); fieldSet2.ID = "FieldSet2"; fieldSet2.Title = "Order Information"; fieldSetRow1.Items.Add(fieldSet2); Obout.SuperForm.FieldSet fieldSet3 = new Obout.SuperForm.FieldSet(); fieldSet3.ID = "FieldSet3"; fieldSet3.Title = "Additional Information"; fieldSetRow1.Items.Add(fieldSet3); Obout.SuperForm.FieldSetRow fieldSetRow2 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet4 = new Obout.SuperForm.FieldSet(); fieldSet4.ID = "FieldSet4"; fieldSet4.ColumnSpan = 3; fieldSet4.CssClass = "command-row"; fieldSetRow2.Items.Add(fieldSet4); SuperForm1.FieldSets.Add(fieldSetRow1); SuperForm1.FieldSets.Add(fieldSetRow2); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1.Fields.Add(field7); SuperForm1.Fields.Add(field8); SuperForm1.Fields.Add(field9); SuperForm1.Fields.Add(field10); SuperForm1.Fields.Add(field11); SuperForm1.Fields.Add(field12); SuperForm1.Fields.Add(field13); ph1.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.DataKeyNames = new string[] { "EmployeeID" }; SuperForm1.AllowPaging = true; SuperForm1.ValidationGroup = "Group1"; SuperForm1.DefaultMode = DetailsViewMode.Insert; SuperForm1.ItemCommand += SuperForm1_ItemCommand; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "EmployeeID"; field1.HeaderText = "Employee ID"; field1.ReadOnly = true; field1.InsertVisible = false; RequiredFieldValidator field2Required = new RequiredFieldValidator(); field2Required.ID = "FirstNameValidator"; field2Required.Display = ValidatorDisplay.None; field2Required.ErrorMessage = "First Name is mandatory"; ValidatorCalloutExtender field2CalloutExtender = new ValidatorCalloutExtender(); field2CalloutExtender.ID = "FirstNameValidatorCallout"; field2CalloutExtender.TargetControlID = "FirstNameValidator"; field2CalloutExtender.Width = 250; field2CalloutExtender.HighlightCssClass = "highlight"; field2CalloutExtender.WarningIconImageUrl = "resources/icons/warning.gif"; field2CalloutExtender.CloseImageUrl = "resources/icons/close.gif"; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "FirstName"; field2.HeaderText = "First Name"; field2.Validators.Add(field2Required); field2.Validators.Add(field2CalloutExtender); RequiredFieldValidator field3Required = new RequiredFieldValidator(); field3Required.ID = "LastNameValidator"; field3Required.Display = ValidatorDisplay.None; field3Required.ErrorMessage = "Last Name is mandatory"; field3Required.Text = "*"; ValidatorCalloutExtender field3CalloutExtender = new ValidatorCalloutExtender(); field3CalloutExtender.ID = "LastNameValidatorCallout"; field3CalloutExtender.TargetControlID = "LastNameValidator"; field3CalloutExtender.Width = 250; field3CalloutExtender.HighlightCssClass = "highlight"; field3CalloutExtender.WarningIconImageUrl = "resources/icons/warning.gif"; field3CalloutExtender.CloseImageUrl = "resources/icons/close.gif"; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "LastName"; field3.HeaderText = "Last Name"; field3.Validators.Add(field3Required); field3.Validators.Add(field3CalloutExtender); RequiredFieldValidator field4Required = new RequiredFieldValidator(); field4Required.ID = "TitleOfCourtesyValidator1"; field4Required.Display = ValidatorDisplay.None; field4Required.ErrorMessage = "Courtesy Title is mandatory"; field4Required.Text = "*"; ValidatorCalloutExtender field4Callout1 = new ValidatorCalloutExtender(); field4Callout1.ID = "TitleOfCourtesyValidatorCallout1"; field4Callout1.TargetControlID = "TitleOfCourtesyValidator1"; field4Callout1.Width = 250; field4Callout1.HighlightCssClass = "highlight"; field4Callout1.WarningIconImageUrl = "resources/icons/warning.gif"; field4Callout1.CloseImageUrl = "resources/icons/close.gif"; CustomValidator field4Custom = new CustomValidator(); field4Custom.ID = "TitleOfCourtesyValidator2"; field4Custom.ServerValidate += ValidateTitle; field4Custom.Display = ValidatorDisplay.Dynamic; field4Custom.ErrorMessage = "Courtesy Title needs to be 'Mr.', 'Ms.', 'Mrs.' or 'Dr.'"; field4Custom.Text = "Courtesy Title needs to be 'Mr.', 'Ms.', 'Mrs.' or 'Dr.'"; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "TitleOfCourtesy"; field4.HeaderText = "Courtesy Title"; field4.Validators.Add(field4Required); field4.Validators.Add(field4Callout1); field4.Validators.Add(field4Custom); RequiredFieldValidator field5Required = new RequiredFieldValidator(); field5Required.ID = "BirthDateValidator1"; field5Required.Display = ValidatorDisplay.None; field5Required.ErrorMessage = "Birth Date is mandatory"; field5Required.Text = "*"; ValidatorCalloutExtender field5Callout1 = new ValidatorCalloutExtender(); field5Callout1.ID = "BirthDateValidatorCallout1"; field5Callout1.TargetControlID = "BirthDateValidator1"; field5Callout1.Width = 250; field5Callout1.HighlightCssClass = "highlight"; field5Callout1.WarningIconImageUrl = "resources/icons/warning.gif"; field5Callout1.CloseImageUrl = "resources/icons/close.gif"; RangeValidator field5Range = new RangeValidator(); field5Range.ID = "BirthDateValidator2"; field5Range.Display = ValidatorDisplay.None; field5Range.MinimumValue = "1900/1/1"; field5Range.MaximumValue = "2039/12/31"; field5Range.Type = ValidationDataType.Date; field5Range.ErrorMessage = "Birth Date needs to be in this format: mm/dd/yyyy"; field5Range.Text = "*"; ValidatorCalloutExtender field5Callout2 = new ValidatorCalloutExtender(); field5Callout2.ID = "BirthDateValidatorCallout2"; field5Callout2.TargetControlID = "BirthDateValidator2"; field5Callout2.Width = 250; field5Callout2.HighlightCssClass = "highlight"; field5Callout2.WarningIconImageUrl = "resources/icons/warning.gif"; field5Callout2.CloseImageUrl = "resources/icons/close.gif"; Obout.SuperForm.DateField field5 = new Obout.SuperForm.DateField(); field5.DataField = "BirthDate"; field5.HeaderText = "Birth Date"; field5.DataFormatString = "{0:MM/dd/yyyy}"; field5.ApplyFormatInEditMode = true; field5.Validators.Add(field5Required); field5.Validators.Add(field5Callout1); field5.Validators.Add(field5Range); field5.Validators.Add(field5Callout2); RequiredFieldValidator field6Required = new RequiredFieldValidator(); field6Required.ID = "HomePhoneValidator1"; field6Required.Display = ValidatorDisplay.None; field6Required.ErrorMessage = "Home Phone is mandatory"; field6Required.Text = "*"; ValidatorCalloutExtender field6Callout1 = new ValidatorCalloutExtender(); field6Callout1.ID = "HomePhoneValidatorCallout1"; field6Callout1.TargetControlID = "HomePhoneValidator1"; field6Callout1.Width = 250; field6Callout1.HighlightCssClass = "highlight"; field6Callout1.WarningIconImageUrl = "resources/icons/warning.gif"; field6Callout1.CloseImageUrl = "resources/icons/close.gif"; RegularExpressionValidator field6Range = new RegularExpressionValidator(); field6Range.ID = "HomePhoneValidator2"; field6Range.Display = ValidatorDisplay.None; field6Range.ValidationExpression = "^(\\(?\\s*\\d{3}\\s*[\\)\\-\\.]?\\s*)?[1-9]\\d{2}\\s*[\\-\\.]\\s*\\d{4}$"; field6Range.ErrorMessage = "Home Phone must be in this format (###) ###-####"; field6Range.Text = "*"; ValidatorCalloutExtender field6Callout2 = new ValidatorCalloutExtender(); field6Callout2.ID = "HomePhoneValidatorCallout2"; field6Callout2.TargetControlID = "HomePhoneValidator2"; field6Callout2.Width = 250; field6Callout2.HighlightCssClass = "highlight"; field6Callout2.WarningIconImageUrl = "resources/icons/warning.gif"; field6Callout2.CloseImageUrl = "resources/icons/close.gif"; Obout.SuperForm.BoundField field6 = new Obout.SuperForm.BoundField(); field6.DataField = "HomePhone"; field6.HeaderText = "Home Phone"; field6.Validators.Add(field6Required); field6.Validators.Add(field6Callout1); field6.Validators.Add(field6Range); field6.Validators.Add(field6Callout2); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Employee Form"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.Width = Unit.Pixel(480); SuperForm1.DataKeyNames = new string[] { "EmployeeID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; SuperForm1.ItemUpdating += SuperForm1_ItemUpdating; SuperForm1.ItemInserting += SuperForm1_ItemInserting; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "EmployeeID"; field1.HeaderText = "Employee ID:"; field1.ReadOnly = true; field1.InsertVisible = false; field1.Visible= false; field1.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "FirstName"; field2.HeaderText = "First Name:"; field2.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "LastName"; field3.HeaderText = "Last Name:"; field3.FieldSetID = "FieldSet1"; Obout.SuperForm.TemplateField field4 = new Obout.SuperForm.TemplateField(); field4.FieldSetID = "FieldSet2"; field4.ItemTemplate = new TabStripItemTemplate(); field4.EditItemTemplate = new TabStripEditItemTemplate(); Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField(); field5.DataField = "City"; field5.HeaderText = "City:"; field5.FieldSetID = "FieldSet3"; Obout.SuperForm.DateField field6 = new Obout.SuperForm.DateField(); field6.DataField = "BirthDate"; field6.HeaderText = "Birth Date:"; field6.FieldSetID = "FieldSet3"; field6.DataFormatString = "{0:MM/dd/yyyy}"; field6.ApplyFormatInEditMode = true; Obout.SuperForm.BoundField field7 = new Obout.SuperForm.BoundField(); field7.DataField = "Address"; field7.HeaderText = "Address:"; field7.FieldSetID = "FieldSet3"; Obout.SuperForm.DateField field8 = new Obout.SuperForm.DateField(); field8.DataField = "HireDate"; field8.HeaderText = "Hire Date:"; field8.FieldSetID = "FieldSet3"; field8.DataFormatString = "{0:MM/dd/yyyy}"; field8.ApplyFormatInEditMode = true; Obout.SuperForm.BoundField field9 = new Obout.SuperForm.BoundField(); field9.DataField = "Country"; field9.HeaderText = "Country:"; field9.FieldSetID = "FieldSet3"; Obout.SuperForm.BoundField field10 = new Obout.SuperForm.BoundField(); field10.DataField = "Salary"; field10.HeaderText = "Salary:"; field10.FieldSetID = "FieldSet3"; Obout.SuperForm.BoundField field11 = new Obout.SuperForm.BoundField(); field11.DataField = "HomePhone"; field11.HeaderText = "HomePhone:"; field11.FieldSetID = "FieldSet4"; Obout.SuperForm.BoundField field12 = new Obout.SuperForm.BoundField(); field12.DataField = "Extension"; field12.HeaderText = "Extension:"; field12.FieldSetID = "FieldSet4"; Obout.SuperForm.BoundField field13 = new Obout.SuperForm.BoundField(); field13.DataField = "PostalCode"; field13.HeaderText = "PostalCode:"; field13.FieldSetID = "FieldSet4"; Obout.SuperForm.BoundField field14 = new Obout.SuperForm.BoundField(); field14.DataField = "Region"; field14.HeaderText = "Region:"; field14.FieldSetID = "FieldSet4"; Obout.SuperForm.TemplateField field15 = new Obout.SuperForm.TemplateField(); field15.FieldSetID = "FieldSet5"; field15.HeaderText = "Notes:"; field15.ItemTemplate = new EditorItemTemplate(); field15.EditItemTemplate = new EditorEditItemTemplate(); Obout.SuperForm.FieldSetRow fieldSetRow1 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet1 = new Obout.SuperForm.FieldSet(); fieldSet1.ID = "FieldSet1"; fieldSet1.Direction = Direction.Horizontal; fieldSet1.CssClass = "field-set"; fieldSetRow1.Items.Add(fieldSet1); Obout.SuperForm.FieldSetRow fieldSetRow2 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet2 = new Obout.SuperForm.FieldSet(); fieldSet2.ID = "FieldSet2"; fieldSet2.Direction = Direction.Horizontal; fieldSet2.CssClass = "field-set"; fieldSetRow2.Items.Add(fieldSet2); Obout.SuperForm.FieldSetRow fieldSetRow3 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet3 = new Obout.SuperForm.FieldSet(); fieldSet3.ID = "FieldSet3"; fieldSet3.Direction = Direction.Horizontal; fieldSet3.CssClass = "field-set field-set-visible"; fieldSetRow3.Items.Add(fieldSet3); Obout.SuperForm.FieldSetRow fieldSetRow4 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet4 = new Obout.SuperForm.FieldSet(); fieldSet4.ID = "FieldSet4"; fieldSet4.Direction = Direction.Horizontal; fieldSet4.CssClass = "field-set field-set-hidden"; fieldSetRow4.Items.Add(fieldSet4); Obout.SuperForm.FieldSetRow fieldSetRow5 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet5 = new Obout.SuperForm.FieldSet(); fieldSet5.ID = "FieldSet5"; fieldSet5.Direction = Direction.Horizontal; fieldSet5.CssClass = "field-set field-set-hidden-editor"; fieldSetRow5.Items.Add(fieldSet5); SuperForm1.FieldSets.Add(fieldSetRow1); SuperForm1.FieldSets.Add(fieldSetRow2); SuperForm1.FieldSets.Add(fieldSetRow3); SuperForm1.FieldSets.Add(fieldSetRow4); SuperForm1.FieldSets.Add(fieldSetRow5); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1.Fields.Add(field7); SuperForm1.Fields.Add(field8); SuperForm1.Fields.Add(field9); SuperForm1.Fields.Add(field10); SuperForm1.Fields.Add(field11); SuperForm1.Fields.Add(field12); SuperForm1.Fields.Add(field13); SuperForm1.Fields.Add(field14); SuperForm1.Fields.Add(field15); SuperForm1.FieldHeaderStyle.Width = Unit.Pixel(200); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Order Details"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; RangeValidator field4Range = new RangeValidator(); field4Range.ID = "RangeValidator1"; field4Range.MinimumValue = "1900/1/1"; field4Range.MaximumValue = "2039/12/31"; field4Range.Type = ValidationDataType.Date; field4Range.ErrorMessage = "*"; RangeValidator field5Range = new RangeValidator(); field5Range.ID = "RangeValidator2"; field5Range.MinimumValue = "1900/1/1"; field5Range.MaximumValue = "2039/12/31"; field5Range.Type = ValidationDataType.Date; field5Range.ErrorMessage = "*"; RangeValidator field6Range = new RangeValidator(); field6Range.ID = "RangeValidator3"; field6Range.MinimumValue = "1900/1/1"; field6Range.MaximumValue = "2039/12/31"; field6Range.Type = ValidationDataType.Date; field6Range.ErrorMessage = "*"; RangeValidator field7Range = new RangeValidator(); field7Range.ID = "RangeValidator4"; field7Range.MinimumValue = "0.00"; field7Range.MaximumValue = "999.99"; field7Range.Type = ValidationDataType.Currency; field7Range.ErrorMessage = "*"; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "OrderID"; field1.HeaderText = "Order ID"; field1.ReadOnly = true; field1.InsertVisible = false; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ShipName"; field2.HeaderText = "Ship Name"; field2.Required = true; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "ShipCountry"; field3.HeaderText = "Ship Country"; field3.Required = true; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "OrderDate"; field4.HeaderText = "Order Date"; field4.Required = true; field4.DataFormatString = "{0:MM/dd/yyyy}"; field4.ApplyFormatInEditMode = true; field4.Validators.Add(field4Range); Obout.SuperForm.DateField field5 = new Obout.SuperForm.DateField(); field5.DataField = "ShippedDate"; field5.HeaderText = "Shipped Date"; field5.Required = true; field5.DataFormatString = "{0:MM/dd/yyyy}"; field5.ApplyFormatInEditMode = true; field5.Validators.Add(field5Range); Obout.SuperForm.DateField field6 = new Obout.SuperForm.DateField(); field6.DataField = "RequiredDate"; field6.HeaderText = "Required Date"; field6.Required = true; field6.DataFormatString = "{0:MM/dd/yyyy}"; field6.ApplyFormatInEditMode = true; field6.Validators.Add(field6Range); Obout.SuperForm.BoundField field7 = new Obout.SuperForm.BoundField(); field7.DataField = "Freight"; field7.HeaderText = "Freight"; field7.Required = true; field7.DataFormatString = "{0:C2}"; field7.ApplyFormatInEditMode = false; field7.Validators.Add(field7Range); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1.Fields.Add(field7); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Edit Order"; SuperForm1.DataSourceID = "SqlDataSource2"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.AutoGenerateDateFields = true; SuperForm1.DataKeyNames = new string[] { "OrderID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; SuperForm1.ItemUpdated += SuperForm1_ItemUpdated; SuperForm1.ItemCommand += SuperForm1_ItemCommand; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "OrderID"; field1.HeaderText = "Order ID"; field1.ReadOnly = true; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "ShipName"; field2.HeaderText = "Ship Name"; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "ShipCity"; field3.HeaderText = "Ship City"; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "ShipRegion"; field4.HeaderText = "Ship Region"; Obout.SuperForm.DropDownListField field5 = new Obout.SuperForm.DropDownListField(); field5.DataField = "ShipCountry"; field5.HeaderText = "Ship Country"; field5.DataSourceID = "SqlDataSource3"; Obout.SuperForm.DateField field6 = new Obout.SuperForm.DateField(); field6.DataField = "OrderDate"; field6.HeaderText = "Order Date"; field6.DataFormatString = "{0:MM/dd/yyyy}"; field6.ApplyFormatInEditMode = true; Obout.SuperForm.DateField field7 = new Obout.SuperForm.DateField(); field7.DataField = "ShippedDate"; field7.HeaderText = "Shipped Date"; field7.DataFormatString = "{0:MM/dd/yyyy}"; field7.ApplyFormatInEditMode = true; Obout.SuperForm.DateField field8 = new Obout.SuperForm.DateField(); field8.DataField = "RequiredDate"; field8.HeaderText = "Required Date"; field8.DataFormatString = "{0:MM/dd/yyyy}"; field8.ApplyFormatInEditMode = true; SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1.Fields.Add(field7); SuperForm1.Fields.Add(field8); SuperForm1Container.Controls.Add(SuperForm1); if (!IsPostBack) { SqlDataSource2.SelectParameters[0].DefaultValue = Request.QueryString["OrderID"]; } }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Employee Form"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.DataKeyNames = new string[] { "EmployeeID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; CustomValidator field4Custom = new CustomValidator(); field4Custom.ID = "CustomValidator1"; field4Custom.ServerValidate += ValidateTitle; field4Custom.ErrorMessage = "Title needs to be 'Mr.', 'Ms.', 'Mrs.' or 'Dr.'"; field4Custom.Display = ValidatorDisplay.Dynamic; RangeValidator field5Custom = new RangeValidator(); field5Custom.ID = "RangeValidator1"; field5Custom.MinimumValue = "1900/1/1"; field5Custom.MaximumValue = "2039/12/31"; field5Custom.Type = ValidationDataType.Date; field5Custom.ErrorMessage = "*"; RegularExpressionValidator field6Custom = new RegularExpressionValidator(); field6Custom.ID = "RegularExpressionValidator1"; field6Custom.Display = ValidatorDisplay.Dynamic; field6Custom.ValidationExpression = "^(\\(?\\s*\\d{3}\\s*[\\)\\-\\.]?\\s*)?[1-9]\\d{2}\\s*[\\-\\.]\\s*\\d{4}$"; field6Custom.ErrorMessage = "Phone numbers must have this format (###) ###-####"; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "EmployeeID"; field1.HeaderText = "Employee ID"; field1.ReadOnly = true; field1.InsertVisible = false; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "FirstName"; field2.HeaderText = "First Name"; field2.Required = true; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "LastName"; field3.HeaderText = "Last Name"; field3.Required = true; Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField(); field4.DataField = "TitleOfCourtesy"; field4.HeaderText = "Courtesy Title"; field4.Required = true; field4.Validators.Add(field4Custom); Obout.SuperForm.DateField field5 = new Obout.SuperForm.DateField(); field5.DataField = "BirthDate"; field5.HeaderText = "Birth Date"; field5.Required = true; field5.DataFormatString = "{0:MM/dd/yyyy}"; field5.ApplyFormatInEditMode = true; field5.Validators.Add(field5Custom); Obout.SuperForm.BoundField field6 = new Obout.SuperForm.BoundField(); field6.DataField = "HomePhone"; field6.HeaderText = "Home Phone"; field6.Required = true; field6.Validators.Add(field6Custom); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1Container.Controls.Add(SuperForm1); }
protected void Page_Load(object sender, EventArgs e) { SuperForm1 = new SuperForm(); SuperForm1.ID = "SuperForm1"; SuperForm1.Title = "Employee Form"; SuperForm1.DataSourceID = "SqlDataSource1"; SuperForm1.AutoGenerateRows = false; SuperForm1.AutoGenerateInsertButton = true; SuperForm1.AutoGenerateEditButton = true; SuperForm1.AutoGenerateDeleteButton = true; SuperForm1.Width = Unit.Pixel(480); SuperForm1.DataKeyNames = new string[] { "EmployeeID" }; SuperForm1.AllowPaging = true; SuperForm1.DefaultMode = DetailsViewMode.Edit; SuperForm1.ItemUpdating += SuperForm1_ItemUpdating; SuperForm1.ItemInserting += SuperForm1_ItemInserting; Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField(); field1.DataField = "EmployeeID"; field1.HeaderText = "Employee ID:"; field1.ReadOnly = true; field1.InsertVisible = false; field1.Visible = false; field1.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField(); field2.DataField = "FirstName"; field2.HeaderText = "First Name:"; field2.FieldSetID = "FieldSet1"; Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField(); field3.DataField = "LastName"; field3.HeaderText = "Last Name:"; field3.FieldSetID = "FieldSet1"; Obout.SuperForm.TemplateField field4 = new Obout.SuperForm.TemplateField(); field4.FieldSetID = "FieldSet2"; field4.ItemTemplate = new TabStripItemTemplate(); field4.EditItemTemplate = new TabStripEditItemTemplate(); Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField(); field5.DataField = "City"; field5.HeaderText = "City:"; field5.FieldSetID = "FieldSet3"; Obout.SuperForm.DateField field6 = new Obout.SuperForm.DateField(); field6.DataField = "BirthDate"; field6.HeaderText = "Birth Date:"; field6.FieldSetID = "FieldSet3"; field6.DataFormatString = "{0:MM/dd/yyyy}"; field6.ApplyFormatInEditMode = true; Obout.SuperForm.BoundField field7 = new Obout.SuperForm.BoundField(); field7.DataField = "Address"; field7.HeaderText = "Address:"; field7.FieldSetID = "FieldSet3"; Obout.SuperForm.DateField field8 = new Obout.SuperForm.DateField(); field8.DataField = "HireDate"; field8.HeaderText = "Hire Date:"; field8.FieldSetID = "FieldSet3"; field8.DataFormatString = "{0:MM/dd/yyyy}"; field8.ApplyFormatInEditMode = true; Obout.SuperForm.BoundField field9 = new Obout.SuperForm.BoundField(); field9.DataField = "Country"; field9.HeaderText = "Country:"; field9.FieldSetID = "FieldSet3"; Obout.SuperForm.BoundField field10 = new Obout.SuperForm.BoundField(); field10.DataField = "Salary"; field10.HeaderText = "Salary:"; field10.FieldSetID = "FieldSet3"; Obout.SuperForm.BoundField field11 = new Obout.SuperForm.BoundField(); field11.DataField = "HomePhone"; field11.HeaderText = "HomePhone:"; field11.FieldSetID = "FieldSet4"; Obout.SuperForm.BoundField field12 = new Obout.SuperForm.BoundField(); field12.DataField = "Extension"; field12.HeaderText = "Extension:"; field12.FieldSetID = "FieldSet4"; Obout.SuperForm.BoundField field13 = new Obout.SuperForm.BoundField(); field13.DataField = "PostalCode"; field13.HeaderText = "PostalCode:"; field13.FieldSetID = "FieldSet4"; Obout.SuperForm.BoundField field14 = new Obout.SuperForm.BoundField(); field14.DataField = "Region"; field14.HeaderText = "Region:"; field14.FieldSetID = "FieldSet4"; Obout.SuperForm.TemplateField field15 = new Obout.SuperForm.TemplateField(); field15.FieldSetID = "FieldSet5"; field15.HeaderText = "Notes:"; field15.ItemTemplate = new EditorItemTemplate(); field15.EditItemTemplate = new EditorEditItemTemplate(); Obout.SuperForm.FieldSetRow fieldSetRow1 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet1 = new Obout.SuperForm.FieldSet(); fieldSet1.ID = "FieldSet1"; fieldSet1.Direction = Direction.Horizontal; fieldSet1.CssClass = "field-set"; fieldSetRow1.Items.Add(fieldSet1); Obout.SuperForm.FieldSetRow fieldSetRow2 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet2 = new Obout.SuperForm.FieldSet(); fieldSet2.ID = "FieldSet2"; fieldSet2.Direction = Direction.Horizontal; fieldSet2.CssClass = "field-set"; fieldSetRow2.Items.Add(fieldSet2); Obout.SuperForm.FieldSetRow fieldSetRow3 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet3 = new Obout.SuperForm.FieldSet(); fieldSet3.ID = "FieldSet3"; fieldSet3.Direction = Direction.Horizontal; fieldSet3.CssClass = "field-set field-set-visible"; fieldSetRow3.Items.Add(fieldSet3); Obout.SuperForm.FieldSetRow fieldSetRow4 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet4 = new Obout.SuperForm.FieldSet(); fieldSet4.ID = "FieldSet4"; fieldSet4.Direction = Direction.Horizontal; fieldSet4.CssClass = "field-set field-set-hidden"; fieldSetRow4.Items.Add(fieldSet4); Obout.SuperForm.FieldSetRow fieldSetRow5 = new Obout.SuperForm.FieldSetRow(); Obout.SuperForm.FieldSet fieldSet5 = new Obout.SuperForm.FieldSet(); fieldSet5.ID = "FieldSet5"; fieldSet5.Direction = Direction.Horizontal; fieldSet5.CssClass = "field-set field-set-hidden-editor"; fieldSetRow5.Items.Add(fieldSet5); SuperForm1.FieldSets.Add(fieldSetRow1); SuperForm1.FieldSets.Add(fieldSetRow2); SuperForm1.FieldSets.Add(fieldSetRow3); SuperForm1.FieldSets.Add(fieldSetRow4); SuperForm1.FieldSets.Add(fieldSetRow5); SuperForm1.Fields.Add(field1); SuperForm1.Fields.Add(field2); SuperForm1.Fields.Add(field3); SuperForm1.Fields.Add(field4); SuperForm1.Fields.Add(field5); SuperForm1.Fields.Add(field6); SuperForm1.Fields.Add(field7); SuperForm1.Fields.Add(field8); SuperForm1.Fields.Add(field9); SuperForm1.Fields.Add(field10); SuperForm1.Fields.Add(field11); SuperForm1.Fields.Add(field12); SuperForm1.Fields.Add(field13); SuperForm1.Fields.Add(field14); SuperForm1.Fields.Add(field15); SuperForm1.FieldHeaderStyle.Width = Unit.Pixel(200); SuperForm1Container.Controls.Add(SuperForm1); }