AllowColumnsReorder and Insert

2 posts, 1 answers
  1. Hunter
    Hunter avatar
    44 posts
    Member since:
    Aug 2012

    Posted 17 May 2012 Link to this post

    I was on Telerik's site looking at some demos of the TreeList when I saw, under the "What's New" section, the ability to reorder columns. I decided to build a test and see how this new functionality worked when I stumbled across a problem. If I enable reordering (i.e. AllowColumnsReorder = "true") I cannot insert a root level node (insert template appears but I can't type in any textboxes). I say stumble because I can add items at any other level without issue. I took my testing a step further and realized that when using the built-in "In-line editing mode" I can reorder columns while the insert template is displayed. Not that I was necessarily looking for this, but I noticed that the associated editors (ex. textbox) does not follow the reordered columns. I went ahead and added a button to my page which, server side, toggles the reorder properties of the treelist. If I toggle the reorder properties to false I can insert without issue.

    My question, how do I insert a root node when reordering is enabled? Should/can I toggle the reorder properties client side when an insert or edit mode is entered?
  2. Answer
    Marin avatar
    1057 posts

    Posted 22 May 2012 Link to this post


     Thank you for reporting this issue. We will try to resolve it for future releases of the controls. Meanwhile you can disable the column reordering when the insert form is opened with the following code:

    protected void RadTreeList1_ItemCommand(object sender, TreeListCommandEventArgs e)
            if (e.CommandName==RadTreeList.InitInsertCommandName)
                RadTreeList1.ClientSettings.Reordering.AllowColumnsReorder = false;
            if (e.CommandName==RadTreeList.CancelCommandName)
                RadTreeList1.ClientSettings.Reordering.AllowColumnsReorder = true;

    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