CompletIT Community Server

Welcome to CompletIT Community Server Sign in | Join | Help

Re: DataGridView Extension. How to set up a default persistence folder.

  •  05-22-2008, 8:05 AM

    Re: DataGridView Extension. How to set up a default persistence folder.

    Hi Willy,

    Sorry for the delay answer.

    Here is what we did in order to reproduce your problem:
    1. In VS2008 we created Windows Forms Application Project named 'DGVE Publish Test';
    2. Then we added references to all five assemblies of the extension;
    3. Added new DataGridView control and managed it by the extension design-time;
    4. Run the application and make some customizations of the managed grid;
    5. Close the running application;
    6. Define publish options;
    7. Publish the application;
    8. Install it and run it from the location it was published.

    As far as we understood the problem is that in step 8 you want your grids to be customized with some specific themes and styles predefined by you and deployed on the clients machine. Correct us if we make a mistake.

    In order to deploy to the users machine your predefined themes you have to:
    1. Run your application on your development machine and create all themes and customizations for the grid controls. Make your application look the way you want your users see it;
    2. Find the ExtensionSettings folder that contains all of your customizations you created in previous step;
    3. Copy the whole folder ExtensionSettings and include it in your VS project;
    4. Open the properties of your project and go to Publish page. There you have to click on button 'Application Files...' and include all of the files under the newly added ExtensionSettings folder. You have to change their Publish Status to 'Include';
    5. Last step is to add the following lines of code in the beginning of you main method:
         DataGridViewExtensionComponent c = new DataGridViewExtensionComponent();
         DGVEXmlPersistenceManager.ExtensionSettingsPath = Application.StartupPath;
         DataGridViewExtensionComponent.Extension.UpdateAllGridsWithPersistedSettings();
         DGVEThemesManager.UpdateListWithSavedThemes();
    Please note that the first line of code in the code snippet above is a workaround for a bug in the extension.

    Please try this solution if it is suitable for you and tell us the result. We hope we have understand your problem correctly.

    Sincerely Yours
    Support Team

     

View Complete Thread
Powered by Community Server (Personal Edition), by Telligent Systems