protected void SuperForm1_DataBound(object sender, EventArgs e) { OboutDropDownList yearDdl = SuperForm1.GetFieldControl(1) as OboutDropDownList; yearDdl.MenuWidth = Unit.Pixel(90); yearDdl.Items.Add(new ListItem("")); for (int i = 2010; i < 2025; i++) { yearDdl.Items.Add(new ListItem(i.ToString())); } OboutDropDownList monthDdl = SuperForm1.GetFieldControl(2) as OboutDropDownList; monthDdl.Items.Add(new ListItem("")); monthDdl.Items.Add(new ListItem("January")); monthDdl.Items.Add(new ListItem("February")); monthDdl.Items.Add(new ListItem("March")); monthDdl.Items.Add(new ListItem("April")); monthDdl.Items.Add(new ListItem("May")); monthDdl.Items.Add(new ListItem("June")); monthDdl.Items.Add(new ListItem("July")); monthDdl.Items.Add(new ListItem("August")); monthDdl.Items.Add(new ListItem("September")); monthDdl.Items.Add(new ListItem("October")); monthDdl.Items.Add(new ListItem("November")); monthDdl.Items.Add(new ListItem("December")); }
protected void SuperForm1_DataBound(object sender, EventArgs e) { if (SuperForm1.CurrentMode != DetailsViewMode.ReadOnly) { OboutTextBox password = SuperForm1.GetFieldControl(1) as OboutTextBox; password.TextMode = TextBoxMode.Password; } }
protected void SuperForm1_DataBound(object sender, EventArgs e) { if (SuperForm1.CurrentMode != DetailsViewMode.ReadOnly) { OboutCheckBox discontinuedChk = SuperForm1.GetFieldControl(2) as OboutCheckBox; discontinuedChk.ClientSideEvents.OnCheckedChanged = "Discontinued_CheckedChanged"; } }
protected void SuperForm1_DataBound(object sender, EventArgs e) { if (SuperForm1.CurrentMode != DetailsViewMode.ReadOnly) { OboutDropDownList customerIDDdl = SuperForm1.GetFieldControl(1) as OboutDropDownList; customerIDDdl.Items.Insert(0, new ListItem("Select a customer ...")); OboutDropDownList shipCountryDdl = SuperForm1.GetFieldControl(2) as OboutDropDownList; shipCountryDdl.Items.Insert(0, new ListItem("Select a country ...")); } }