Save and Restore Gridview settings with new Silverlight 5 binaries

3 posts, 1 answers
  1. danparker276
    danparker276 avatar
    389 posts
    Member since:
    Aug 2010

    Posted 17 Feb 2012 Link to this post

    I noticed the online documentation link doesn't work anymore

    When moving the to the new binaries the old code breaks. Somethings are mentioned in the Breaking Changes thread, but somethings are not.

    SortDirection wasn't covered in the thread, I guessed:
    IColumnFilterDescriptor columnDescriptor = (from c in grid.Columns.OfType<GridViewBoundColumnBase>()
                where c.GetDataMemberName() == setting.PropertyName
                select c).FirstOrDefault().ColumnFilterDescriptor;
    columnDescriptor.Column.SortingState = SortListToSettings(setting.SortDirection);

    FieldFilter.Filter1.Member doesn't work anymore, I guessed to remove it:

                                    IColumnFilterDescriptor cfd = matchingColumn.ColumnFilterDescriptor;
                                    if (setting.Filter1 != null && setting.Filter1.Member != null)
                                        cfd.FieldFilter.Filter1.Member = setting.Filter1.Member;
                                        cfd.FieldFilter.Filter1.Operator = setting.Filter1.Operator;
                                        cfd.FieldFilter.Filter1.Value = setting.Filter1.Value;

    also, this doesn't work
     FilterSetting setting = new FilterSetting();
     setting.PropertyName = cfd.Column.DataMemberBinding.Path.Path;

    Are these ok?  Are you going to replace the documentation on how to restore settings?
    Maybe alll of those functions have to be re-written, but I don't have time to do that right now. I was wondering if there are some quick fixes.
  2. Answer
    Maya avatar
    4062 posts

    Posted 20 Feb 2012 Link to this post

    Hello Dan,

    Actually, the current suggested approach is to work with RadPersistenceFramework. Please refer to our demos for a reference.

    Kind regards,
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft R3 2016 release webinar banner
  4. danparker276
    danparker276 avatar
    389 posts
    Member since:
    Aug 2010

    Posted 21 Feb 2012 Link to this post

    Thanks the RadPersistenceFramework is much better.
Back to Top