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

RadComboBox dropdown not displaying in ReportViewer

1 Answer 143 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dane
Top achievements
Rank 1
Dane asked on 21 Aug 2012, 09:44 PM
Hello,

I have run into an issue where a RadComboBox does not display any items when clicked in a WPF 4 application (Reporting Version 5.3.11.1116). The combobox itself lies within a RadToolBar in a ReportViewer. A small sliver of a dropdown is displayed (see image, same width as the RadComboBox) as though there is nothing in it. Even if there were no items to display, I would expect the combobox's dropdown to respect the MinWidth="150" seen below.

<telerik:RadToolBar Grid.Row="0">
    <!--<telerik:RadButton Command="{Binding NavigateBackCommand}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/NavBack.png"/>
            </Image.Source>
        </Image>
    </telerik:RadButton>
    <telerik:RadButton Command="{Binding NavigateForwardCommand}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/NavForward.png"/>
            </Image.Source>
        </Image>
    </telerik:RadButton>
    <telerik:RadToolBarSeparator/>-->
    <telerik:RadButton Command="{Binding RefreshReportCommand}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/Refresh.png"/>
            </Image.Source>
        </Image>
    </telerik:RadButton>
    <telerik:RadToolBarSeparator/>
    <telerik:RadButton Command="{Binding MoveToFirstPageCommand}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/FirstPage.png"/>
            </Image.Source>
        </Image>
    </telerik:RadButton>
    <telerik:RadButton Command="{Binding MoveToPreviousPageCommand}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/PrevPage.png"/>
            </Image.Source>
        </Image>
    </telerik:RadButton>
    <telerik:RadToolBarSeparator/>
    <TextBox IsEnabled="{Binding IsMoveToPageEnabled}" Margin="10,0,0,0" MinWidth="30" TextAlignment="Center" Text="{Binding PageNumber, Mode=TwoWay}" VerticalAlignment="Center"/>
    <TextBlock Margin="2,0,10,0" TextAlignment="Center" VerticalAlignment="Center">
            <TextBlock.Text>
                <Binding ConverterParameter="of {0} pages" Path="PageCount">
                    <Binding.Converter>
                        <tr:FormatedNumberConverter/>
                    </Binding.Converter>
                </Binding>
            </TextBlock.Text>
    </TextBlock>
    <telerik:RadToolBarSeparator/>
    <telerik:RadButton Command="{Binding MoveToNextPageCommand}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/NextPage.png"/>
            </Image.Source>
        </Image>
    </telerik:RadButton>
    <telerik:RadButton Command="{Binding MoveToLastPageCommand}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/LastPage.png"/>
            </Image.Source>
        </Image>
    </telerik:RadButton>
    <telerik:RadToolBarSeparator/>
    <telerik:RadToggleButton Command="{Binding TogglePrintPreviewCommand}" InnerCornerRadius="0" Margin="0,2" Padding="2" Visibility="{TemplateBinding ViewModeToggleVisibility}">
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/PrintPreview.png"/>
            </Image.Source>
        </Image>
    </telerik:RadToggleButton>
    <telerik:RadButton Command="{Binding PrintReportCommand}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/Print.png"/>
            </Image.Source>
        </Image>
    </telerik:RadButton>
    <telerik:RadToolBarSeparator/>
    <telerik:RadComboBox Height="24"  Margin="1,0" MaxDropDownHeight="300" Padding="2,0" Width="45">
        <telerik:RadComboBox.EmptySelectionBoxTemplate>
            <DataTemplate>
                <Image HorizontalAlignment="Left" Height="16" Visibility="Visible" Width="16">
                    <Image.Source>
                        <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/Export.png"/>
                    </Image.Source>
                </Image>
            </DataTemplate>
        </telerik:RadComboBox.EmptySelectionBoxTemplate>
        <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
                <TextBlock MinWidth="150" Text="{Binding Description}"/>
            </DataTemplate>
        </telerik:RadComboBox.ItemTemplate>
        <telerik:RadComboBox.SelectionBoxTemplate>
            <DataTemplate>
                <Image HorizontalAlignment="Left" Height="16" Visibility="Visible" Width="16">
                    <Image.Source>
                        <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/Export.png"/>
                    </Image.Source>
                </Image>
            </DataTemplate>
        </telerik:RadComboBox.SelectionBoxTemplate>
        <telerik:StyleManager.Theme>
            <telerik:Office_BlackTheme/>
        </telerik:StyleManager.Theme>
    </telerik:RadComboBox>
    <telerik:RadToolBarSeparator/>
    <telerik:RadToggleButton IsChecked="{Binding IsDocumentMapVisible, Mode=TwoWay}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <telerik:RadToggleButton.Visibility>
            <Binding Path="HasDocumentMap">
                <Binding.Converter>
                    <tr:VisibilityConverter/>
                </Binding.Converter>
            </Binding>
        </telerik:RadToggleButton.Visibility>
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/DocumentMap.png"/>
            </Image.Source>
        </Image>
    </telerik:RadToggleButton>
    <telerik:RadToggleButton IsChecked="{Binding IsParametersAreaVisible, Mode=TwoWay}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <telerik:RadToggleButton.Visibility>
            <Binding Path="HasParameters">
                <Binding.Converter>
                    <tr:VisibilityConverter/>
                </Binding.Converter>
            </Binding>
        </telerik:RadToggleButton.Visibility>
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/Parameters.png"/>
            </Image.Source>
        </Image>
    </telerik:RadToggleButton>
</telerik:RadToolBar>

I have included the following in a configSection in my app.config to no avail:

<Telerik.Reporting>
    <Extensions>
        <Render>
            <Extension name="IMAGE" description="TIFF Image" visible="false" />
            <Extension name="PDF" description="Adobe Acrobat PDF" visible="true" />
            <Extension name="MHTML" description="Compressed Web Archive" visible="false" />
            <Extension name="XLS" description="Excel" visible="false" />
            <Extension name="CSV" description="Comma Seperated Values" visible="false" />
            <Extension name="RTF" description="Rich Text File (RTF)" visible="false" />
            <Extension name="XPS" description="Microsoft XPS Document" visible="true" />
        </Render>
    </Extensions>
</Telerik.Reporting>

Is there anything apparent that I am missing?

Thanks for your time,

Dane

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 24 Aug 2012, 03:40 PM
Hello Dane,

Your Silverlight viewer template is incomplete, the combobox is not showing any options, as it is missing its ItemsSource i.e. it should be like this:

<telerik:RadComboBox Height="24"  Margin="1,0" MaxDropDownHeight="300" Padding="2,0" Width="45">

should be:

<telerik:RadComboBox Height="24" ItemsSource="{Binding RenderingExtensions}" IsEnabled="{Binding IsExportEnabled}" MaxDropDownHeight="300" Padding="2,0" SelectedItem="{Binding SelectedRenderingExtension, Mode=TwoWay}"  Margin="1,0" Width="45">

Kind regards,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

Tags
General Discussions
Asked by
Dane
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or