i need to bind the combo box to a linq datasouce and when clicked it show a 2 cols dropdown.
i keep getting error message on the e.Item.DataItem conversion what should the ????? be ?
Protected Sub RdProviders_ItemDataBound(ByVal sender As Object, ByVal e As RadComboBoxItemEventArgs)
Dim ds As New mobilesdcDataContext
e.Item.Text =
DirectCast(e.Item.DataItem, ?????)("ProviderExtension").ToString() + "; " + (DirectCast(e.Item.DataItem, ??????))("ProviderName").ToString()
e.Item.Value = (
DirectCast(e.Item.DataItem, ?????))("ProviderExtension").ToString()
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Dim ds As New mobilesdcDataContext
Dim result = From p In ds.Providers_tbls Select p
rbProviders.DataSource = result.ToList
rbProviders.DataTextField =
"ProviderName"
rbProviders.DataValueField =
"ProviderExtension"
rbProviders.DataBind()
End If
End Sub