Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
290
Help with binding a Webdropdown to Linq to Sql
posted

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