Server side Event Selected Item value

2 posts, 0 answers
  1. NA
    NA avatar
    39 posts
    Member since:
    Aug 2013

    Posted 18 Jan 2014 Link to this post

    How to get the selected Item Value and at time that value go to input to  radgrid
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 19 Jan 2014 Link to this post


    Please have a look into the following code snippet to achieve your scenario.

    <telerik:RadDropDownTree ID="RadDropDownTree1" runat="server" AutoPostBack="true"
        DataSourceID="SqlDataSource1" DataTextField="text" DataFieldParentID="parentid"
        DataFieldID="id" OnEntryAdded="RadDropDownTree1_EntryAdded">
    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="true" 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 = new SqlDataAdapter();
        adapter.SelectCommand = new SqlCommand("SELECT * from Details WHERE text LIKE '" + e.Entry.Text + "%'", conn);
        DataTable data = new DataTable();
        RadGrid1.Visible = true;
        RadGrid1.DataSource = data;

    Let me know if you have any concern.
  3. DevCraft R3 2016 release webinar banner
Back to Top