NTreeList column reorder event


https://www.nevron.com/Forum/Topic6894.aspx
Print Topic | Close Window

By Craig Swearingen - 12 Years Ago
I've set EnableColumnReorder to true in my NTreeList.  Been looking (ColumnNotify, HeaderNotify, and HeaderItemDragAction) but I can't find an event that gets fired when the user reorders the columns with the mouse.  What's the recommended way to know that the user has done this and the columns have changed order?  On a grid there is a ColumnDisplayIndexChanged event.  What's the way to know this in an NTreeList? 
By Nevron Support - 12 Years Ago
You can attach to NTreeList.ItemBeginDrag, NTreeList.ItemDrag or NTreeList.ItemDragComplete for the each stage of drag and drop process.
In the event handler you need to check whether the type of NLightUIItemDragDropEventArgs.Item is NTreeListHeaderItem or it is concrete header item:

void nTreeList1_ItemDrag(object sender, NLightUIItemDragDropEventArgs e)
{
   if (e.Item is NTreeListHeaderItem)
   {
   
   }
}
By Craig Swearingen - 12 Years Ago
That works perfectly.  Thanks very much.