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

AllowColumnsReorder and Insert

1 Answer 62 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Hunter
Top achievements
Rank 1
Hunter asked on 17 May 2012, 04:54 PM
Hello,
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?

1 Answer, 1 is accepted

Sort by
0
Accepted
Marin
Telerik team
answered on 22 May 2012, 01:59 PM
Hi,

 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;
        }
    }

Greetings,
Marin
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.
Tags
TreeList
Asked by
Hunter
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or