Nevron Forum

NTreeList column reorder event

https://www.nevron.com/Forum/Topic6894.aspx

By Craig Swearingen - Wednesday, August 29, 2012

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 - Thursday, August 30, 2012

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 - Thursday, August 30, 2012

That works perfectly.  Thanks very much.