Rebinding items after changing items order

2 posts, 0 answers
  1. Kulyk
    Kulyk avatar
    1 posts
    Member since:
    Jan 2013

    Posted 12 Nov 2014 Link to this post

    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.

  2. Angel Petrov
    Admin
    Angel Petrov avatar
    1006 posts

    Posted 17 Nov 2014 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top