public TableRow CreateTableRowWithDropdown(string sLabelText, string sControlId) { TableRow oTr = new TableRow(); TableCell oCell1 = new TableCell(); TableCell oCell2 = new TableCell(); Label oLabel = new Label(); oLabel.Text = sLabelText; oCell1.Controls.Add(oLabel); Obout.Interface.OboutDropDownList ddlCountries = new Obout.Interface.OboutDropDownList(); ddlCountries.ID = sControlId; ddlCountries.Width = Unit.Pixel(150); ddlCountries.Height = Unit.Pixel(200); ddlCountries.MenuWidth = Unit.Pixel(175); ddlCountries.DataSourceID = "sds3"; ddlCountries.DataTextField = "ShipCountry"; ddlCountries.DataValueField = "ShipCountry"; oCell2.Controls.Add(ddlCountries); oTr.Cells.Add(oCell1); oTr.Cells.Add(oCell2); return(oTr); }
void grid2_DataBound(object sender, EventArgs e) { DetailGrid detailGrid = sender as DetailGrid; Obout.Interface.OboutTextBox txtShipName = detailGrid.Templates[0].Container.FindControl("txtShipName") as Obout.Interface.OboutTextBox; Obout.Interface.OboutTextBox txtShipCity = detailGrid.Templates[0].Container.FindControl("txtShipCity") as Obout.Interface.OboutTextBox; Obout.Interface.OboutDropDownList ddlShipCountries = detailGrid.Templates[0].Container.FindControl("ddlShipCountries") as Obout.Interface.OboutDropDownList; if (txtShipName != null && txtShipCity != null && ddlShipCountries != null) { txtShipName.ID = detailGrid.ID + "_txtShipName"; txtShipCity.ID = detailGrid.ID + "_txtShipCity"; ddlShipCountries.ID = detailGrid.ID + "_ddlShipCountries"; detailGrid.Columns[2].TemplateSettings.RowEditTemplateControlId = txtShipName.ID; detailGrid.Columns[3].TemplateSettings.RowEditTemplateControlId = txtShipCity.ID; detailGrid.Columns[4].TemplateSettings.RowEditTemplateControlId = ddlShipCountries.ID; } }
public TableRow CreateTableRowWithDropdown(string sLabelText, string sControlId) { TableRow oTr = new TableRow(); TableCell oCell1 = new TableCell(); TableCell oCell2 = new TableCell(); Label oLabel = new Label(); oLabel.Text = sLabelText; oCell1.Controls.Add(oLabel); Obout.Interface.OboutDropDownList ddlCountries = new Obout.Interface.OboutDropDownList(); ddlCountries.ID = sControlId; ddlCountries.Width = Unit.Pixel(150); ddlCountries.Height = Unit.Pixel(200); ddlCountries.MenuWidth = Unit.Pixel(175); ddlCountries.DataSourceID = "sds3"; ddlCountries.DataTextField = "ShipCountry"; ddlCountries.DataValueField = "ShipCountry"; oCell2.Controls.Add(ddlCountries); oTr.Cells.Add(oCell1); oTr.Cells.Add(oCell2); return oTr; }