Expand|Select|Wrap|Line Numbers
- protected override void OnInit(EventArgs e)
- {
- sSearchConditions = new string[] { "", "Begins With", "Contains", "Does Not Contain", "Ends With", "Equals", "Not Equal" };
- base.OnInit(e);
- Table tSearch = new Table();
- tSearch.ID = "tCriteria";
- TableHeaderRow thr = new TableHeaderRow();
- for (int n = 0; n < 3; n++)
- {
- Label lblFields = new Label();
- lblFields.Text = "Select Search Field:";
- lblFields.CssClass = "tLBLText";
- Label lblCondition = new Label();
- lblCondition.Text = "Select Condition: ";
- lblCondition.CssClass = "tLBLText";
- Label lblValue = new Label();
- lblValue.Text = "Type Value: ";
- lblValue.CssClass = "tLBLText";
- //Fields
- DropDownList ddl0 = new DropDownList();
- ddl0 = (DropDownList)Application[Global.DDLFields];
- ddl0.ID = "ddlFields" + n.ToString();
- //Conditions
- DropDownList ddl1 = new DropDownList();
- ddl1.ID = "ddlCondition" + n.ToString();
- ddl1.DataSource = sSearchConditions;
- ddl1.DataBind();
- TextBox tb1 = new TextBox();
- tb1.ID = "tb" + n.ToString();
- tb1.CssClass = "tcText";
- TableRow tr = new TableRow();
- TableCell tc1 = new TableCell();
- tc1.Controls.Add(lblFields);
- tc1.Controls.Add(ddl0);
- TableCell tc2 = new TableCell();
- tc2.Controls.Add(lblCondition);
- tc2.Controls.Add(ddl1);
- TableCell tc3 = new TableCell();
- tc3.Controls.Add(lblValue);
- tc3.Controls.Add(tb1);
- tr.Cells.Add(tc1);
- tr.Cells.Add(tc2);
- tr.Cells.Add(tc3);
- tSearch.Rows.Add(tr);
- }
- pCustomSearch.Controls.Add(tSearch);
- //pCustomSearch is a Panel Control