return feedback message on remove node

4 posts, 0 answers
  1. Alaa'
    Alaa' avatar
    20 posts
    Member since:
    Apr 2014

    Posted 14 Apr 2014 Link to this post

    Hi telerik ,
    in my project  which like transfer employees example demo , I use remove concept
    at ajaxrequest event on server before I remove node from chart i have a condition if it true i can remove the node, else i must return a message(eg:"this node can't remove") , how I can do that ? i try to use hiddenfield but it does't work correctly 

    thank you 
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Apr 2014 in reply to Alaa' Link to this post

    Hi Alaa,

    I suggest that you can use a label to show the feedback message. Please have a look into the following sample code snippet to show the feedback message.

    ASPX:
    <telerik:RadOrgChart ID="RadOrgChart1" runat="server">
      ...       
    </telerik:RadOrgChart>
    <asp:Label ID="lblFeedbackMessage" runat="server">
    </asp:Label>
    <br />
    <telerik:RadButton ID="btnRemoveNode" runat="server" Text="Remove" OnClick="btnRemoveNode_Click"></telerik:RadButton>

    C#:
    protected void btnRemoveNode_Click(object sender, EventArgs e)
    {
        //your condiyion for removing the node
        if ()
        {
            //code for removing the node
             
        }
        else
        {
            //feedback message
            lblFeedbackMessage.Text = "this node can't remove";
        }
    }

    Please elaborate your requirement if it doesn't help.
    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Alaa'
    Alaa' avatar
    20 posts
    Member since:
    Apr 2014

    Posted 17 Apr 2014 in reply to Shinu Link to this post

    thnaks Shinu,
    i try to apply what you say but it not work ! , in my case the delete button is an item template inside the node , and the delete operation done by RadAjaxManager_AjaxRequest event as the demo example transfer employees 
    i want to ask if i should use the label in updated controls inside RadAjaxManager like the ORG chart and ListBox to be in the server at the same time .. i don't know if i understand how they work correctly !! :(
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Apr 2014 in reply to Alaa' Link to this post

    Hi Alaa,

    In order to achieve your scenario you have to write both RadOrgChart and Label inside the RadAjaxManager as follows.

    ASPX:
    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadOrgChart1" />
                    <telerik:AjaxUpdatedControl ControlID="lblFeedbackMessage" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    Hope this will helps you.
    Thanks,
    Shinu.
Back to Top