I am using the following combobox to select cities from a view with 30000 rows.
<telerik:RadComboBox ID="ddlCityO" TabIndex="1" runat="server" EmptyMessage="City, State" EnableItemCaching="True" DataSourceID="SqlDataSource1" MarkFirstMatch="True" EnableAutomaticLoadOnDemand="True" MinFilterLength="1" DataTextField="CityState" DataValueField="ID" DropDownAutoWidth="Enabled" Filter="Contains" Skin="MetroTouch" Placeholder="Destination" Width="300px"/>
Is there a better way to approach this?
I have tried to push the data into a datatable:
db.Open()
cmd = New SqlCommand("SELECT ID, CityState FROM v_City", db)
cmd.CommandType = CommandType.Text
Dim da As SqlDataAdapter = New SqlDataAdapter()
da.SelectCommand = cmd
Dim ds As New DataTable
da.Fill(ds)
db.Close()
ddlCityO.DataSourceID = "datatable"
ddlCityO.DataSource = ds
ddlCityO.DataTextField = "CityState"
ddlCityO.DataValueField = "ID"
ddlCityO.DataBind()
This returns an error of "There is no assigned datasource. Unable to complete the callback request"
Any ideas?