Re: HtmlSelect not Binding
Brad Wilson <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.web |
|---|---|
| Message-ID | <[email protected]> |
Call select.DataBind(). On 4/27/07, Brady Kelly <[email protected]> wrote: > > I have an HtmlSelect control that I dynamically add to a Repeater row (I > build each row in ItemDataBound). I set data binding properties as > follows, > but when the drop down renders it is still empty. Why could this be? > > > > HtmlSelect select = new HtmlSelect(); > > select.Value = dataValue.ToString(); > > select.DataSource = this.MyController.WorkTypeList > ; > > select.DataValueField = "WorkTypeID"; > > select.DataTextField = "WorkType"; > > gridCell.Controls.Add(select); > > > =================================== > This list is hosted by DevelopMentor(r) http://www.develop.com > > View archives and manage your subscription(s) at > http://discuss.develop.com > -- http://www.agileprogrammer.com/dotnetguy/ http://www.flickr.com/photos/dotnetguy/ =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com