All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
<
telerik:RadDropDownTree
ID
=
"RadDropDownTree1"
runat
"server"
AutoPostBack
"true"
DataSourceID
"SqlDataSource1"
DataTextField
"text"
DataFieldParentID
"parentid"
DataFieldID
"id"
OnEntryAdded
"RadDropDownTree1_EntryAdded"
>
</
telerik:RadGrid
"RadGrid1"
AutoGenerateColumns
Visible
"false"
protected
void
RadDropDownTree1_EntryAdded(
object
sender, Telerik.Web.UI.DropDownTreeEntryEventArgs e)
{
String connstring = WebConfigurationManager.ConnectionStrings[
"NorthwindConnectionString"
].ConnectionString;
SqlConnection conn =
new
SqlConnection(connstring);
SqlDataAdapter adapter =
SqlDataAdapter();
adapter.SelectCommand =
SqlCommand(
"SELECT * from Details WHERE text LIKE '"
+ e.Entry.Text +
"%'"
, conn);
DataTable data =
DataTable();
conn.Open();
try
adapter.Fill(data);
}
finally
conn.Close();
RadGrid1.Visible =
true
;
RadGrid1.DataSource = data;
RadGrid1.DataBind();