When to Save Layout

2 posts, 0 answers
  1. Chris Kirkman
    Chris Kirkman avatar
    101 posts
    Member since:
    Apr 2010

    Posted 14 Dec 2017 Link to this post

    I have a need to save the layout of the grid any time the user adds/removes columns, resizes column widths and/or rearranges the order of columns.  I already know to use the grid.SaveLayout() method.  That's not the issue, I just don't want to have to listen to so many events to be able to know when to call SaveLayout().
  2. Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    4086 posts

    Posted 15 Dec 2017 Link to this post

    Hello, Chris,

    Thank you for writing.  

    In order to detect when a column is added, removed or moved you can handle the RadGridView.Columns.CollectionChanged event. The NotifyCollectionChangedEventArgs.Action argument indicates what is the change. As to the columns resizing, you can handle the RadGridView.ColumnWidthChanged event.

    I hope this information helps. Should you have further questions I would be glad to help.
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top