convertTo in ExpandableCollectionConverter

Grids for WPF Forum

Posted 7 years ago by Mary Fontana - Rudolph Technologies
Avatar
I have a property item that is a collection of booleans that represent the days of the week. I am using List<Boolean>

I created a custom ExpandableCollectionConverter to override ConvertTo method.
Instead of showing "7 items" it displays the items that are true in the list.
so if only the first 2 are set then it will display "Mon, Tue"

My problem is when I change a value of one of the items in list, it does not call the ConvertTo method again. Is there a way to force the redisplay of the list value field.

Thanks in advance,

Mary

[Modified at 10/27/2011 09:08 PM]

Comments (3)

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Mary,

The child items should have access to their Parent property, on which you can call Refresh to update it's display. Depending on the base class of your child item IPropertyDataAccessor, you may be able to simply override the ShouldNotifyParent property and return true.


Actipro Software Support

Posted 7 years ago by Mary Fontana - Rudolph Technologies
Avatar
Thanks that worked. But now the parent item is collapsed after edit the child item.
How can I leave the parent item expanded?

Thanks,
Mary
Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Mary,

Sorry, refreshing a parent would force it to rebuild it children as well. In the upcoming release, there will be an option to control whether refreshing a parent means it should update it's editor (what you want) and/or update it's children (what you don't want).


Actipro Software Support

The latest build of this product (v2018.1 build 0675) was released 12 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.