Databound DefaultSeriesDefinition

2 posts, 0 answers
  1. Tim Robbins
    Tim Robbins avatar
    1 posts
    Member since:
    May 2010

    Posted 08 Jun 2010 Link to this post


    What can one do if the viewModel holds the information wether to display a pie or a bar chart?
    Concerning the mvvm pattern I think that this should be the right place - I've tried it like this; perhaps a bit naive:

    <telerik:RadChart Name="radChart1" DefaultSeriesDefinition="{Binding MySeriesDef}">
    With MySeriesDef a property of type ISeriesDefinition.

    But unfortunately this is not working.
    How can one achieve this without the need to use code in the View?

    A big thanks for any help!!!
  2. Velin
    Velin avatar
    391 posts

    Posted 10 Jun 2010 Link to this post

    Hi Tim Robbins,

    The DefaultSeriesDefinition property can not be bound in xaml at present. I would recommend you to use the data binding approach when population your RadChart. Your ViewModel could expose a property of type SeriesMappingCollection containing the series mappings needed(along with their SeriesDefinitions). This property should be bound to the RadChart.SeriesMappings collection.

    Hope this will help.

    Kind regards,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top