I used a sample project from another post and have a RadGridView as the DropDownContent for a DropDownButton. The Content of the Button is bound to the SeletedItem of the GridView. And I created a ContentTemplate to display a piece of data from the SelectedItem.
How do I display something (a message that says "Select Source" or something similar) when no item is selected in the GridView. Would I use a TemplateSelector? If so, How? I'm not sure and I've never used TemplateSelector.
Here is my scaled down code for my ddb:
Thanks.
How do I display something (a message that says "Select Source" or something similar) when no item is selected in the GridView. Would I use a TemplateSelector? If so, How? I'm not sure and I've never used TemplateSelector.
Here is my scaled down code for my ddb:
<telerik:RadDropDownButton Width="180" Name="SourcesDropDown" Content="{Binding SelectedItem, ElementName=gridView}"> <telerik:RadDropDownButton.ContentTemplate> <DataTemplate> <TextBlock Text="{Binding Name}" /> </DataTemplate> </telerik:RadDropDownButton.ContentTemplate> <telerik:RadDropDownButton.DropDownContent> <telerik:RadGridView ShowGroupPanel="False" x:Name="gridView" AutoGenerateColumns="False" IsReadOnly="True" IsFilteringAllowed="True" ItemsSource="{Binding Sources, Source={StaticResource References}}" Width="450" Height="150"> <telerik:RadGridView.Columns>...</telerik:RadGridView.Columns> </telerik:RadGridView> </telerik:RadDropDownButton.DropDownContent> </telerik:RadDropDownButton>Thanks.