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

Rebinding items after changing items order

1 Answer 15 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Kulyk
Top achievements
Rank 1
Kulyk asked on 12 Nov 2014, 09:36 AM
Hi,

I have a functionality of moving items up and down same hierarchical level.

Treelist is wrapped into ajaxPanal.

Items are sorted within level according to "OrderNo"
I've added two buttons "MoveUp" and "MoveDown", which are changing item 's "OrderNo".

  protected void MoveQuestionDown(object sender, EventArgs e)
        {
            var itemId = int.Parse(((ImageButton)sender).CommandArgument);
            Presenter.MoveDown(itemId);
            QuestionsTree.Rebind();      
        }

        protected void MoveQuestionUp(object sender, EventArgs e)
        {
            var itemId = int.Parse(((ImageButton)sender).CommandArgument);
            Presenter.MoveUp(itemId);            
            QuestionsTree.Rebind();    
        }

Loadondemand is enabled.

Everything works fine until one of items is expanded and moved.
If i try to move (for example "down") expanded item with child's. it moves down but, item it was switched with cannot be expanded anymore. Expand button disappears.

Will appreciate any help.

Thank You.

1 Answer, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 17 Nov 2014, 08:53 AM
Hi,

I am sorry to say but the provided information is not sufficient for us to determine what exactly is causing the illustrated behavior. Could you please share with us the entire page contents so we could examine the implementation? Additionally please disable the load on demand and test the page again.

Regards,
Angel Petrov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
TreeList
Asked by
Kulyk
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Share this question
or