This is a migrated thread and some comments may be shown as answers.

Empty Collection Message

1 Answer 11 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Rayne
Top achievements
Rank 1
Rayne asked on 13 Sep 2011, 04:54 PM
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.

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 16 Sep 2011, 03:28 PM
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 >>

Tags
TabControl
Asked by
Rayne
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or