Saving by PersistenceManager but missed Converter and StringFormat

3 posts, 0 answers
  1. Dario Concilio
    Dario Concilio avatar
    180 posts
    Member since:
    Apr 2016

    Posted 03 May 2016 Link to this post


    I'm saving by PersistenceMaganer on my GridView but when I try to reload it missed converter and formatstring in some column.

    When reloading it doesn't apply Converter called FuoriCorsoConverter and StringFormat of "Last Update" column, durthermore other column with StringFormat is correctly applyed instead.



    //Portions of code for saving
    PersistenceManager manager = new PersistenceManager();
    var streamGridView = manager.Save(this.DocumentHostGridView);
    //Portion of code for loading
    private void LoadPersonalizzazione()
        //Personlizzazione del docking
        var stream = ViewModel.CaricaPersonalizzazione(this.GetType().ToString()); //ref. UserControl.xaml.cs
        if (stream != null)
        //Personalizzazione della gridview principale
        MemoryStream streamGridView = ViewModel.CaricaPersonalizzazioneControllo(this.GetType().ToString(),
        if (streamGridView != null)
            streamGridView.Position = 0L;
            PersistenceManager manager = new PersistenceManager();
            manager.Load(this.DocumentHostGridView, streamGridView);

    XAML of columns

    <telerik:GridViewDataColumn Header="Last Update" DataMemberBinding="{Binding UltimoAggiornamento, StringFormat={}{0:dd/MM/yyyy}}"/>
    <telerik:GridViewImageColumn Header="Out" DataMemberBinding="{Binding FuoriCorso, Converter={StaticResource FuoriCorsoConverter}}"/>

  2. Stefan
    Stefan avatar
    1073 posts

    Posted 05 May 2016 Link to this post

    Hello Potito,

    I prepared a sample application with which I tried reproducing such malfunction, but to no avail. Can you please check it out? Moreover, can you please share some details on how the implementation differs from the one in your application? It would be quite useful if you can modify the demo project as per your exact project setup, so that the issue can be reproduced, and send it as an attachment in a new support thread.

    Stefan X1
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. Dario Concilio
    Dario Concilio avatar
    180 posts
    Member since:
    Apr 2016

    Posted 06 May 2016 in reply to Stefan Link to this post

    I noticed that you used, I'll try to use this approach

    ServiceProvider.RegisterPersistenceProvider<ICustomPropertyProvider>(typeof(RadGridView), new GridViewCustomPropertyProvider());

Back to Top