Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
213
LoadFromXML UltraExplorerBar Deleted Items Re-appearing
posted

Hi,

I am currently allowing our users to save the layout of their explorer bar (SaveAsXml method) but in doing so I've come across a problem when loading the data back into the explorer bar (LoadFromXml method). 

The problem is if I delete one of the items in the explorer bar then load the layout of the explorer bar in, the deleted item comes back. Is there a way to check if the item has been deleted and not show it?

Thanks,
Nathan. 

Parents
  • 69832
    Verified Answer
    Offline posted

    You need to have some way of unambiguously identifying each item. One possible solution would be to use unique keys for all items (you could for example use Guid.NewGuid().ToString()), and then after loading the layout, check each item against a list that you maintain that contains the deleted items, and remove it if it is in the layout. The control exposes an ItemRemoved event which should make it easy to track the deleted items.

    Another approach would be to handle ItemRemoved and save the layout again after the item is deleted.

Reply Children
No Data