Home Forums WPF controls Xceed DataGrid for WPF PropertyChanged in the Column class

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #27185 |

    The propertychanged event doesn’t seem to work for most of the properties in the Column class.I would expect that the following  code would fire property changed events on VisiblePosition, ReadOnly and IsMainColumn. However the example only fires property changed events for IsMainColumn.

    Column c = new Column();
    c.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler( OnColumnPropertyChanged );
    c.VisiblePosition = 1;
    c.VisiblePosition = 5;
    c.ReadOnly = true;
    c.ReadOnly = false;
    c.IsMainColumn = true;
    c.IsMainColumn = false;

     

     

     

     

    Imported from legacy forums. Posted by James (had 686 views)

    Xceed Support
    Member
    Post count: 5658

    IsMainColumn is a CLR property and therefore its change notification goes through the PropertyChanged event.

    ReadOnly and VisiblePosition are dependency properties for which you need to use the dp change notification system: DependencyPropertyDescriptor.AddValueChanged Method

    Imported from legacy forums. Posted by Jenny [Xceed] (had 430 views)

    User (Old forums)
    Member
    Post count: 23064

    That worked. Thank you.

    Imported from legacy forums. Posted by James (had 1148 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.