PersistenceFramework vs. GridViewSelectColumn

4 posts, 0 answers
  1. David
    David avatar
    20 posts
    Member since:
    Jan 2012

    Posted 17 Apr 2012 Link to this post

    Hi guys,

    I started working with the PersistanceFramework to save the settings of the RadGridView.
    To check the items, we have inserted a GridViewSelectColumn on 1st position.

    When we save the configuration and load it again, the checkbox in the header of the SelectColumn isn't a checkbox anymore.

    In the header is now: System.Windows.Controls.CheckBox Content: IsChecked:False

    Hope you can rebuild this "bug"?

    Regards,

    David
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 20 Apr 2012 Link to this post

    Hello David,

    As the RadGridView is a complex control, it cannot be persisted out-of-the-box. This is why in our demo solutions we demonstrated how a custom PropertyProvider can be defined for the RadGridView control.

    The GridViewCustomPropertyProvider class holds the logic that determines the RadGridView persistence process. And in your case you need to examine the Columns Header property persistence logic implementation. You can find it in the ProvideValue() and RestoreValue() methods and you can modify it accordingly to your scenario.

    I attached a sample solution where I persist the string representation of the RadGridView.Columns Headers or an empty string if the Header property is null. It works for my scenario so please give it a try and let me know if it works for you as well. Also, if your RadGridView definition is different and my approach doesn't work for you, please modify my solution to reproduce the issue, so that I can suggest another approach.

    Greetings,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. bydt
    bydt avatar
    7 posts
    Member since:
    May 2010

    Posted 30 May 2012 Link to this post

    Hi Tina,

    I am having similar problem but i have managed to display the header checkbox by changing header proxy type into object as following:

    public class ColumnProxy
      {
          public string UniqueName { get; set; }
          public int DisplayOrder { get; set; }
          public object Header { get; set; }
          public GridViewLength Width { get; set; }
      }

    However i find another issue after user settings has been loaded, the "select all" is not working (header of the gridview using GridViewSelectColumn). It seems restored grid is losing something. Could you please help me?

    Thanks.
  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 04 Jun 2012 Link to this post

    Hello Bayudita,

    I attached a sample solution demonstrating how you can go about persisting the selection in the RadGridView control. However, it might be better to synchronize the selected items with your data context instead, using the approach described here.

    Let us know if that information helps or if we can further assist you.

    All the best,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top