Empty Collection Message

2 posts, 0 answers
  1. Rayne
    Rayne avatar
    241 posts
    Member since:
    Sep 2010

    Posted 13 Sep 2011 Link to this post

    Is there a way to display a message to the user when the bound collection is empty?
    I was able to add a custom class to do this for the GridView, but I need to be able to do this with the Tab Control. Right now, it just appears to be blank and I'd like to display a message informing the user on how to create the collection.
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 16 Sep 2011 Link to this post

    Hi Rayne,

    I am not sure I understand your scenario correctly and I might be missing in what environment you need to implement it. However, if you handle the RadTabControl.Loaded event you can display a message containing additional information about the ItemsSource collection of the control and how it can be defined:
    private void RadTabControl_Loaded(object sender, RoutedEventArgs e)
    {
        RadTabControl tabControl = sender as RadTabControl;
        if ((tabControl.ItemsSource as IList).Count == 0)
        {
            RadWindow.Alert("Enter ItemsSource");
        }
    }
    Is this close to what you have in mind?

    All the best,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top