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.
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.