Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6771257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:24:39+00:00 2026-05-26T15:24:39+00:00

I am working in a Silverlight 4 application. I have a datagrid that I

  • 0

I am working in a Silverlight 4 application. I have a datagrid that I would like to print. I am trying to use davidpoll printing functionality

Currently, I am printing just the datagrid header, but no items are being printed

 <SLaB:CollectionPrinter x:Name="printer" ItemsSource="{Binding CurrentSearchView}" >
        <SLaB:CollectionPrinter.BodyTemplate>
            <DataTemplate>
                <sdk:DataGrid x:Name="dgResults" VerticalAlignment="Stretch" SelectionMode="Single" HorizontalAlignment="Stretch" AutoGenerateColumns="False" ItemsSource="{Binding CurrentSearchView}" IsReadOnly="True" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled" Margin="10" FontSize="12" FontFamily="Segoe UI" >
                    <sdk:DataGrid.Columns>
                        <sdk:DataGridTextColumn Binding="{Binding PeopleId}" Header="People ID" Width="150"/>
                        <sdk:DataGridTextColumn Binding="{Binding Name}" Header="Name" Width="*" MinWidth="80"/>
                        <sdk:DataGridTemplateColumn Header="FQ" Width="80">
                            <sdk:DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <StackPanel x:Name="spFq" Background="{Binding FqBackground}" Margin="2">
                                        <Image Source="{Binding FqImagePath}" Margin="4" Height="24" Width="24"/>
                                    </StackPanel>
                                </DataTemplate>
                            </sdk:DataGridTemplateColumn.CellTemplate>
                        </sdk:DataGridTemplateColumn>
                        <sdk:DataGridTemplateColumn Header="LQ" Width="80" CellStyle="{StaticResource BrowseQualityCellStyle}">
                            <sdk:DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <StackPanel x:Name="spLq" Orientation="Horizontal" Background="{Binding LqBackground}" Margin="2" >
                                        <myControls:PlayButtonControl x:Name="playControl" Margin="4" Height="24" Width="24" />
                                        <Image Source="{Binding LqImagePath}"  Margin="4" Height="16" Width="16"/>
                                    </StackPanel>
                                </DataTemplate>
                            </sdk:DataGridTemplateColumn.CellTemplate>
                        </sdk:DataGridTemplateColumn>
                        <sdk:DataGridTextColumn Binding="{Binding Format}" Header="Format" Width="Auto"/>
                        <sdk:DataGridTextColumn Binding="{Binding Duration}" Header="Duration" Width="Auto"/>
                        <sdk:DataGridTextColumn Binding="{Binding Attachment}" Header="Attachment" Width="Auto"/>
                        <sdk:DataGridTextColumn Binding="{Binding Restore}" Header="Restore" Width="Auto"/>
                    </sdk:DataGrid.Columns>
                </sdk:DataGrid>
            </DataTemplate>
        </SLaB:CollectionPrinter.BodyTemplate>
    </SLaB:CollectionPrinter>

And here is the button command

 <Button Command="{Binding PrintCommand, ElementName=printer}">Print</Button>

Note that both, the collectionprinter and datagrid are referencing the same property CurrentSearchView, which is a PagedCollectionView. I think that my problem lies there, maybe I am not able to used this kind of collection (i also try with an observable collection and found the same results), or my bindings are wrong (having both controls referencing the same property, doesn’t seem right)

Any help will be greatly appreciated.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:24:39+00:00Added an answer on May 26, 2026 at 3:24 pm

    I have found the problem. I needed to set the binding of the datagrid to “CurrentItems”

     <sdk:DataGrid x:Name="dgResults" VerticalAlignment="Stretch" SelectionMode="Single" HorizontalAlignment="Stretch" AutoGenerateColumns="False" ItemsSource="{Binding CurrentItems}" IsReadOnly="True" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled" Margin="10" FontSize="12" FontFamily="Segoe UI" >
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently working on a silverlight business application, so I have come across
I am currently working on an application that allows reverse geocoding using silverlight +
I have a Silverlight application that I am working on. I have a few
I am working on a Silverlight application that uses WCF. I need to have
I am currently working on a Silverlight 4.0 Application that displays about 13.000 rows
I would like to add some scripting support to a Silverlight 4 application that
I'm working on a Silverlight application that works with WCF services. While loading the
I'm currently working on a Silverlight application connected to a SQL Server 2008 Express
I am trying to get out of browser support working for my Silverlight application
I am working on a C# Silverlight application that needs some text rotated 90

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.