Column Moved Event and Column Resized Event

10 posts, 0 answers
  1. Laura
    Laura avatar
    11 posts
    Member since:
    Jun 2009

    Posted 24 Nov 2009 Link to this post

    Hello,
    I have searched the forum but have not found a way to get notification when:
    1.  a column is moved 
    2.  a column is resized

    What is the straightforward way to capture these events? I'm trying to do this from a custom control that extends RadGridView.

    I'm using Q2 release.

    Thanks,
    Laura
  2. Tsvyatko
    Admin
    Tsvyatko avatar
    858 posts

    Posted 27 Nov 2009 Link to this post

    Hi Laura,

    You can easily track the changes in the columns order using RadGridView.ColumnReordered event.

    In 2009.Q2 version there is a ColumnWidthChanged event, but this event supports columns layout infrastructure and should not be used directly from your code. That's why this event is obsolete with the current release (2009.Q3), which means that with the next official this event will be no longer available. Can you provide us with more detailed information about your scenario how do you intend to use this event? We need this information to reconsider adding such public API.

    Thank you in advance.

    Greetings,
    Tsvyatko Konov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Laura
    Laura avatar
    11 posts
    Member since:
    Jun 2009

    Posted 30 Nov 2009 Link to this post

    Hello,

    I'm extending the RadGridView, and I don't see the ColumnReordered and ColumnWidthChanged events you mention. I'm using version 2009.2.904.35 of the DLLs.

    What I'm trying to do is have a custom control that extends the RadGridView to auto save settings; those settings include the column order and column width.

    Thanks,
    Laura
  4. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 03 Dec 2009 Link to this post

    Hello Laura,

    You can use the approach from our demo to achieve your goal.

    Regards,
    Vlad
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Laura
    Laura avatar
    11 posts
    Member since:
    Jun 2009

    Posted 09 Dec 2009 Link to this post

    Hi,

    Where is the definition of the class "RadGridViewSettings" in your demo?

    Laura
  6. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 10 Dec 2009 Link to this post

    Hello Laura,

     Looks like we have problems with code viewer in our WPF examples - you can check the same example in our Silverlight demos (the code is the same):
    http://demos.telerik.com/silverlight/#GridView/SaveLoadSettings


    Best wishes,
    Vlad
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Laura
    Laura avatar
    11 posts
    Member since:
    Jun 2009

    Posted 10 Dec 2009 Link to this post

    Hi,

    Thank you Vlad. I tried to use most of the code I could from the demo, and everything is working great with the exception of one type of setting. I'm saving changes as they happen on the grid, but I still don't have a way of knowing when a column has been resized. Is there any event you can suggest to capture that information when it happens?

    By the way, I'm now using Q3 release.

    Laura
  8. Tsvyatko
    Admin
    Tsvyatko avatar
    858 posts

    Posted 14 Dec 2009 Link to this post

    Hello Laura,

    I assume that for the purpose of saving setting of the grid view you can read the value of the width for each column as shown in our examples.
     However if you like to track changes of the columns width you can bind to the width as it is a dependency property. Please check the attached project as reference.

    If you have any more questions do not hesitate to contact us.

    Best wishes,
    Tsvyatko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  9. Laura
    Laura avatar
    11 posts
    Member since:
    Jun 2009

    Posted 16 Dec 2009 Link to this post

    Thanks, this works.
    Laura
  10. parthiv
    parthiv avatar
    7 posts
    Member since:
    Sep 2017

    Posted 28 Nov in reply to Vlad Link to this post

    Hi,

    I am using R2 2017 Ver(2017.2.614.40)  of radGridView (WPF ), i want to save and load gridview column position if user drag and drop to another position ,after restart column shoud display at the same position where user has dropped the column...plz help..

Back to Top