Invoke Apply() in CustomMapping

3 posts, 1 answers
  1. Was
    Was avatar
    16 posts
    Member since:
    Dec 2012

    Posted 16 Sep 2014 Link to this post

    I use TreeMap with CustomMapping that marks selected items with an image (see att)

    When loading Data, it works, but how can i change property of DataModel so it would invoke Apply() method of CustomMapping?

    I mean, when the property of DataItem is changed, i'd like to check it again in Apply() method of CustomMapping.

    Thanks

  2. Answer
    Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 18 Sep 2014 Link to this post

    Hi Was,

    Unfortunately there is no public api that will allow you to execute the Apply logic. The Apply method is executed when the Mappings are modified (add, remove, clear), when the LayoutStrategies are modified (add, remove, clear) and when a property of the TreeMapData changes.

    I think that it would be much easier if you could implement this PropertyChanged logic in your DataTemplate and have the image reload when the property in mind changes. Let us know how it goes.

    Regards,
    Petar Marchev
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. DevCraft banner
  4. Was
    Was avatar
    16 posts
    Member since:
    Dec 2012

    Posted 19 Sep 2014 in reply to Petar Marchev Link to this post

    Thanks, Petar, i just re-add mapping and everything works great
Back to Top