Could someone help:
I have a WebDropDown (NetAdvantage 10.3 ASP.NET CLR4X) that I am trying to bind to a Linq to SQL query. The problem I am having is the values displaying in the WebDropDown appear as follows { ID = A/G },{ ID = A/M }, { ID = A/N } ETC. vs A/G, A/M, A/N. Could someone please tell me what I am doing wrong?
Here is how I am binding to the control:
Public Function Get_WharehouseID() As IEnumerable Return (From w In db.WarehouseIDs Select New With {.ID = w.WhseID}).OrderBy("ID", ASCENDING) End Function
Public Sub InitializeDropdowns() wddWarehouse.EnableMultipleSelection = True wddWarehouse.MultipleSelectionType = DropDownMultipleSelectionType.Keyboard Dim objData As New DataLinq wddWarehouse.DataSource = objData.Get_WharehouseID wddWarehouse.DataBind() End Sub
Thanks for the reply. Turns out I was calling .DataBind before setting the.TextField.
Everything works great now
Thanks
Hello duckkiller53 ,
Have you set ValueField and TextField ?
http://samples.infragistics.com/2010.3/WebFeatureBrowser/contents.aspx?showCode=true&t=WebDropDown/DeclarativeDataBinding/../../CLR35/WebDropDown/DeclarativeDataBinding/WebDropDown_LinqDataSource.aspx~srcview.aspx?path=~srcview.aspx?path=WebDropDown/DeclarativeDataBinding/../../CLR35/WebDropDown/DeclarativeDataBinding/WebDropDown_LinqDataSource.src
For example
wddWarehouse.TextField ="ID"
wddWarehouse.ValueField = "ID"
Let me know if you need further assistance.