track GridView column reorder sequence

2 posts, 0 answers
  1. nimesh
    nimesh avatar
    1 posts
    Member since:
    Nov 2016

    Posted 24 Jan 2017 Link to this post

    Column reorder is enable in RadGridView. i want to track the column order.
     
    Lets say I have three column Id, Name and Adreress. There order is 1 2 and3. so my DB will have values like 1,2,3.
    If I swap adress and name, i require to save order as 1,3,2.

    Please Suggest.
  2. Dimitar
    Admin
    Dimitar avatar
    2949 posts

    Posted 24 Jan 2017 Link to this post

    Hello Nimesh,

    You can use the CollectionChanged event to determine when a column is moved:
    radGridView1.Columns.CollectionChanged += Columns_CollectionChanged;
     
     
    private void Columns_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
    {
        if (e.Action == NotifyCollectionChangedAction.Move)
        {
         
        }
    }

    I hope this will be useful. Let me know if you have additional questions.

    Regards,
    Dimitar
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 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