Update ColB style on ColA value change

Mar 17, 2009 at 4:09 PM
Edited Mar 17, 2009 at 4:10 PM
Col A is combo with datatype.  Col B is text column with decimals.  I have ElementStyle and EditingElementStyle that set Visibility of decimals column to Hidden when datatype is not "Numeric".  Works fine initially with only Numeric rows showing Decimals.  When I change datatype for a row to "Character" nothing happens until I click on the decimals cell.  Then it hides the element as it should.  I am sending a PropertyChanged notification to the Decimals column but it won't update the style.  What am I doing wrong?
Mar 18, 2009 at 9:31 PM
There are 2 ways of doing this.
1) Implement a SelectionChanged event handler on the combobox to change the visibility of Col B. This will change visibility for the entire column and not just that row. (if thats what you wish to do)
2) Bind the Visibility property of Col B to the same property that is bound to cell of Col A, using a Converter.

If you want to update visibility of just the cell or disable the cell, option 2 would work.
Mar 19, 2009 at 8:17 PM
Thanks.  I had failed  to notify the dependency property that was triggering the visibility of Col B.