RadRating even if ItemsSource=null

3 posts, 1 answers
  1. Kacem
    Kacem avatar
    8 posts
    Member since:
    Jul 2011

    Posted 02 Sep 2011 Link to this post

    Hi,

    With this code :
     <telerik:RadRating ItemsSource="{Binding}" Value="{Binding}" />
    and in code behind :
    DataContext = null;

    The RadRating control is shown with 5 stars ... How can i disable it (using XAML) if DataContext = null ? 

    Thanks

    Kacem
  2. Answer
    Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 02 Sep 2011 Link to this post

    Hi Kacem,

    If the DataContext is null you can set the NumberOfItemsToGenerate="0". This will force RadRating not to show any stars. Let me know if this helps.

    Best wishes,
    Kiril Stanoev
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. DevCraft banner
  4. Kacem
    Kacem avatar
    8 posts
    Member since:
    Jul 2011

    Posted 03 Sep 2011 Link to this post

    Thank you it work ;)
Back to Top