This is a migrated thread and some comments may be shown as answers.

OnEntryAdded Event is not firing

1 Answer 103 Views
DropDownTree
This is a migrated thread and some comments may be shown as answers.
Yefta
Top achievements
Rank 1
Yefta asked on 26 Aug 2015, 07:49 AM

Hi, i want to ask why OnEntryAdded on RadDropDownTree is not working. I have a RadDropDownTree and RadHTMLChart

The scenario is when i pick one of the nodes, get the value, set it on RadHTMLChart, and render it using AJAX

This is piece of the code:

<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RDDTreeTeam">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ProgressChart" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" Skin="Silk"></telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
<div>
    <table width="100%" border="1">
        <tr>
            <td rowspan="2" valign="top">
                <telerik:RadDropDownTree ID="RDDTreeTeam" runat="server" Width="250" EnableFiltering="true"
                    DataFieldID="ID" DataFieldParentID="ParentID" DataTextField="Text" DataValueField="Value"
                    Skin="Silk" OnEntryAdded="RDDTreeTeam_EntryAdded" OnClientDropDownClosing="OnClientDropDownClosing">
                    <DropDownSettings Height="200" OpenDropDownOnLoad="true" CloseDropDownOnSelection="false"/>
                    <ButtonSettings ShowClear="true" />
                    <FilterSettings Highlight="Matches" EmptyMessage="Type here" />
                </telerik:RadDropDownTree>
            </td>
            <td class="style1" align="center">
                <telerik:RadHtmlChart runat="server" ID="ProgessChart" Width="300px"
                    Height="300px" Transitions="true" Skin="Silk">
                    <ChartTitle Text="Progress Sales">
                        <Appearance Align="Center" Position="Top">
                        </Appearance>
                    </ChartTitle>
                    <Legend>
                        <Appearance Position="Bottom" Visible="true">
                        </Appearance>
                    </Legend>
                    <PlotArea>
                        <Series>
                            <telerik:PieSeries StartAngle="90" DataFieldY="ProgressAmount" NameField="ProgressType">
                                <LabelsAppearance Position="OutsideEnd" DataFormatString="{0}">
                                </LabelsAppearance>
                                <TooltipsAppearance Color="White" DataFormatString="{0}"></TooltipsAppearance>
                            </telerik:PieSeries>
                        </Series>
                    </PlotArea>
                </telerik:RadHtmlChart>
            </td>
        </tr>
    </table>
</div>
</telerik:RadAjaxPanel>

protected void RDDTreeTeam_EntryAdded(object sender, DropDownTreeEntryEventArgs e)
{
    if (e.Entry.Value == "1")
    {
        DataTable dtPie = new DataTable();
        dtPie.Columns.Add(new DataColumn("ProgressAmount"));
        dtPie.Columns.Add(new DataColumn("ProgressType"));
        dtPie.Columns.Add(new DataColumn("Color"));
        dtPie.Columns.Add(new DataColumn("IsExploded"));
 
        dtPie.Rows.Add(new object[] { 803, "On Progress", "Red", false });
        dtPie.Rows.Add(new object[] { 464, "Close Selling", "Green", false });
        dtPie.Rows.Add(new object[] { 505, "Rejected", "Blue", false });
        dtPie.Rows.Add(new object[] { 201, "Not Yet Follow Up", "Yellow", false });
 
        ProgessChart.DataSource = dtPie;
        ProgessChart.DataBind();
    }
    else if (e.Entry.Value == "2")
    {
        DataTable dtPie = new DataTable();
        dtPie.Columns.Add(new DataColumn("ProgressAmount"));
        dtPie.Columns.Add(new DataColumn("ProgressType"));
        dtPie.Columns.Add(new DataColumn("Color"));
        dtPie.Columns.Add(new DataColumn("IsExploded"));
 
        dtPie.Rows.Add(new object[] { 203, "On Progress", "Red", false });
        dtPie.Rows.Add(new object[] { 464, "Close Selling", "Green", false });
        dtPie.Rows.Add(new object[] { 805, "Rejected", "Blue", false });
        dtPie.Rows.Add(new object[] { 401, "Not Yet Follow Up", "Yellow", false });
 
        ProgessChart.DataSource = dtPie;
        ProgessChart.DataBind();
    }
}

 

But, when i click on the node, there's nothing happened. 

Please help me.

Thank you in advance

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivan Danchev
Telerik team
answered on 27 Aug 2015, 03:43 PM
Hello,

I tested you code populating the DropDownTree with sample data and at my side it was working correctly and the event fired. You can test the event's behavior in our DropDownTree - Server-side Events live demo. The event does not fire on node click but after you click on the page and the dropdown closes or if you press Enter after you have selected a node.

Regards,
Ivan Danchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
DropDownTree
Asked by
Yefta
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or