Profile Picture

Re-Order NUIDocuments within NDocumentManager programmatically

Posted By Oliver Münchow 12 Years Ago

Re-Order NUIDocuments within NDocumentManager programmatically

Author
Message
Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hi Oliver,
You need first to remove the NUIDocument from DocumentManager.Documents using RemoveDocument and then add it in the desired position:

m_Manager.DocumentManager.RemoveDocument(doc1);
NDocumentHost host = m_Manager.DocumentManager.ActiveGroup;
m_Manager.DocumentManager.AddDocument(doc1, host, desiredIndex);

Of course, it applies when document view is MdiTabbed.


Best Regards,
Nevron Support Team



Oliver Münchow
Posted 12 Years Ago
View Quick Profile
Junior Member

Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 10, Visits: 2
Within a NDocumentManager it is quite easy to add a new document by simply calling NDocumentManager.AddDocument(). And the user is able to re-order the items by simply drag & drop them in the desired order.

But how can this be achieved programmatically? The NUIDocument doesn't have any index property and the NDocumentManager returns only a fresh array containing all available documents.



Similar Topics


Reading This Topic