CompletIT Community Server

Welcome to CompletIT Community Server Sign in | Join | Help
in Search

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

Last post 06-10-2008, 8:00 AM by willyvidable. 4 replies.
Sort Posts: Previous Next
  •  05-08-2008, 8:10 AM 3230

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

    I am using the DGV Extension on a windows app that is deployed from a web server using OnClick technology. The application runs on the local machine every time the users download it as I set it up for not installing locally. So the options of storing the persistence folder on the user machine on a absolute path (kind of "C:\Documents and Settiings . . ...") doesn't work for me because when the user run the application the grid come up without any configuration and particularly without the configuration I did at design time. Besides I want to configure the Extension object at desig time and desable most of its functions (colors, row and column size etc) at runtime so the user can only configure the printer and exprt options.

    I need to have a persistence folder that contains my default configuration and  look and feel as I define for the DataGridView Extension during the design time somewhere inside the installation folder which I don't know where is. So my question is how I set up the path to be relative to the folder where the application is installed and having the downloaded win application working as I have in my VStudio?

     Thanks in advance for your advice.

  •  05-08-2008, 11:58 PM 3240 in reply to 3230

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

    Hi willyvidable,

    Thank you for using DataGridView Extension and for your feedback!

    In next two days we will perform tests and will tell you how this could be done.

    If you have any other questions or comments do not hesitate to contact us, we will be happy to help you.

    Sincerely Yours
    Support Team

  •  05-21-2008, 10:55 AM 3276 in reply to 3240

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

    Hi,

     

    Is there any news on this already? If you are still working on the issue, please let me know.

     

    Thanks

     

    Willy

  •  05-22-2008, 8:05 AM 3281 in reply to 3276

    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

     

  •  06-10-2008, 8:00 AM 3782 in reply to 3281

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

    Hi Guys,

    I completed my test of your solution and it is working pretty good.

    Thanks a lot for your help.

     

    Regards,

     

View as RSS news feed in XML
Powered by Community Server (Personal Edition), by Telligent Systems