コード例 #1
0
    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);  
    }
コード例 #2
0
    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;
                
        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 = "ShipCountry";
        field4.HeaderText = "Ship Country";

        Obout.SuperForm.CheckBoxField field5 = new Obout.SuperForm.CheckBoxField();
        field5.DataField = "Sent";
        field5.HeaderText = "Sent";

        SuperForm1.Fields.Add(field1);
        SuperForm1.Fields.Add(field2);
        SuperForm1.Fields.Add(field3);
        SuperForm1.Fields.Add(field4);
        SuperForm1.Fields.Add(field5);

        SuperForm1Container.Controls.Add(SuperForm1);
    }
コード例 #3
0
    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);
    }
コード例 #4
0
    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();
        }
    }
コード例 #5
0
    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);
    }
コード例 #6
0
    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);
    }
コード例 #7
0
    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);
       
    }
コード例 #8
0
    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);

    }
コード例 #9
0
    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);
    }
コード例 #10
0
    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.DataBound += SuperForm1_DataBound;

        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;

        RequiredFieldValidator requiredField1 = new RequiredFieldValidator();

        requiredField1.ID           = "RequiredFieldValidator1";
        requiredField1.ErrorMessage = "*";
        field4.Validators.Add(requiredField1);

        Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField();
        field5.DataField  = "UnitsInStock";
        field5.HeaderText = "Units In Stock";
        field5.Collapsed  = true;

        RequiredFieldValidator requiredField2 = new RequiredFieldValidator();

        requiredField2.ID           = "RequiredFieldValidator2";
        requiredField2.ErrorMessage = "*";
        field5.Validators.Add(requiredField2);

        Obout.SuperForm.BoundField field6 = new Obout.SuperForm.BoundField();
        field6.DataField  = "UnitsOnOrder";
        field6.HeaderText = "Units On Order";
        field6.Collapsed  = true;

        RequiredFieldValidator requiredField3 = new RequiredFieldValidator();

        requiredField3.ID           = "RequiredFieldValidator3";
        requiredField3.ErrorMessage = "*";
        field6.Validators.Add(requiredField3);

        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);
    }
コード例 #11
0
    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();
        }
    }
コード例 #12
0
    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);
        
    }