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
155
Adding new command to existing toolbar is not working.
posted

Hi,

Each time the window is opened, the layout of the tool bars is set to default. So, what i taught is while disposing the window i need to load all the toolbar positions and this positions should be saved. While opening again this positions should be loaded from the saved locations.

Then I  tried to save and load toolbar positions by calling the methods savecomponentsetting and loadcomponentsetting, the toolbars positions are working fine.

But when I try to add new command, it says that the command is not found. Before the application opens itself error is occurring.

Please give some approach.

  • 21795
    Offline posted

    Hello Krishna,

    Thank you for posting in our forum.

    If I understand you correctly you are adding toolbars to your UltraToolbarsManager runtime. When you close the application you are saving the layout. When you run the application you are receiving error.

    If this is your scenario please can you answer the next question? After loading all the toolbars do you check if the toolbars you are trying to add runtime are not already loaded in UltraToolbarsManager?

    If you are not checking this what actually happens is you are trying to load a toolbar with the same key twice in UltraToolbarsManager. First time while loading the toolbars calling the LoadComponentSetting method and second time while you add it runtime.

    Please find a small sample solution showing how to check if the toolbar already exists in UltraToolbarsManager’s Toolbars collection.

    Please let me know if this is what you are looking for or if I am missing something.

    CAS-150256-S5R2H2.zip
  • 21795
    Offline posted

    Hello Krishna,

    I am just checking about the progress of this issue. Let me know if you need my further assistance on it.

    Thank you for using Infragistics Components.