2 posts, 0 answers
  1. Dev
    Dev avatar
    1 posts
    Member since:
    Jul 2012

    Posted 20 Jun 2013 Link to this post


    I'm porting over our custom ListView conrol to use the RadListView, however the standard ListView has the ColumnWidthChanged event and the RadListView doesn't, please could someone tell me the best event to use to detect when a column has been resized.

    Many thanks,
  2. Paul
    Paul avatar
    60 posts

    Posted 24 Jun 2013 Link to this post

    Hello Dev,

    Thank you for writing.

    Perhaps the best way to detect whether a column has been resized would be to subscribe to the PropertyChanged event for all columns:
    foreach (ListViewDetailColumn column in this.radListView1.Columns)
        column.PropertyChanged += Columns_PropertyChanged;

    and then check if the property is the one you need:
    void Columns_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        if (e.PropertyName == "Width")
            ListViewDetailColumn column = sender as ListViewDetailColumn;
            if (column != null)
                column.HeaderText = column.Name + " Width changed";
    That should do the work.

    Please do not hesitate to contact us, should have further questions.

    RadChart for WinForms is obsolete. Now what?
Back to Top