Hello,
I was able to successful run this demo: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multiplecomboboxes/defaultcs.aspx
However, in LoadCities function in the where clause I wanted to be able to pass 2 parameters instead of one. For example, let's say I want to do the following, "SELECT * FROM Cities WHERE CountryID=@CountryID and ContinentID=@ContinentID". Below is the function from the demo.
I was able to successful run this demo: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multiplecomboboxes/defaultcs.aspx
However, in LoadCities function in the where clause I wanted to be able to pass 2 parameters instead of one. For example, let's say I want to do the following, "SELECT * FROM Cities WHERE CountryID=@CountryID and ContinentID=@ContinentID". Below is the function from the demo.
protected void LoadCities(string countryID)
{
SqlConnection connection = new SqlConnection(
ConfigurationManager.ConnectionStrings["TelerikConnectionString"].ConnectionString);
SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM Cities WHERE CountryID=@CountryID", connection);
adapter.SelectCommand.Parameters.AddWithValue(
"@CountryID", countryID);
DataTable dt = new DataTable();
adapter.Fill(dt);
RadComboBox3.DataTextField =
"Name";
RadComboBox3.DataValueField =
"ID";
RadComboBox3.DataSource = dt;
RadComboBox3.DataBind();
foreach (RadComboBoxItem item in RadComboBox3.Items)
{
item.ToolTip = item.Text;
}
}
Thanks,
Ivy