Append context menu option using the EditFormSettings Template

5 posts, 0 answers
  1. Paul
    Paul avatar
    29 posts
    Member since:
    Aug 2011

    Posted 07 Nov 2011 Link to this post

    I am trying to add an Append option to the context menu utilizing an Edit Form Template pop-up. The Insert option was easy since you had many examples. I tried, client side, to change the command to InitInsert with a currentIndex of -1 to indicate an Append operation, see below. When it runs, I do not get the Edit Form Template pop-up. I am also trying to incorporate the same functionality into Insert and Append buttons, separate from the Tree List control.

    function CM_onClientItemClicked(sender, args) {

           var commandName = args.get_item().get_value();

           if (commandName == 'Append')

                  _tlConfig.fireCommand('InitInsert', -1);

                    else

                  _tlConfig.fireCommand(commandName, currentIndex);

    }
  2. Paul
    Paul avatar
    29 posts
    Member since:
    Aug 2011

    Posted 09 Nov 2011 Link to this post

    I have gotten the Insert operation working from the context menu and buttons. I have not been able get an Append operation functional. I assume I need to file the InitInsert, but how do a pass an Append operation instead of an insert operation ?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 10 Nov 2011 Link to this post

    Hello Paul,

    Could you please provide information on what you mean by the Append operation?
    The RadTreeList provides option for firing custom commands, which you can handle in custom way. Please examine the Command Reference topic for additional information.

    I hope this helps.

    All the best,
    Mira
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  5. Paul
    Paul avatar
    29 posts
    Member since:
    Aug 2011

    Posted 10 Nov 2011 Link to this post

    Hi Mira

     

    By Append, I mean add a new item to the end of the TreeList. I have been trying to use the fireCommand with the InitInsert and make use of its second parameter. Since it was required but not used, I thought it would be passed with the command. If the second parameter is passed with the command, I haven’t found it. I could place a hidden textbox on the ASP page and set a code for Append versus Insert, but that’s a last resort.

  6. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 15 Nov 2011 Link to this post

    Hello Paul,

    The position of the items in the RadTreeList depends on the order in which they come from the database.
    The second argument of the fireCommand method comes as the e.CommandArgument in the ItemCommand event handler.
    However, I am still unable to fully understand the difference between the InitInsert and Append commands in your scenario. If you need further assistance, please provide more information on them and I will do my best to help you.

    Best wishes,
    Mira
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017