如何將DataGrid
中的數據導出爲PDF?快速解決方案。如何從datagrid的數據導出PDF?
<DataGrid Name="table" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" IsTextSearchEnabled="True" Background="White">
<DataGrid.Columns>
<DataGridTextColumn Header="Timestamp" Binding="{Binding StartDate}" SortDirection="Descending" SortMemberPath="StartDate" IsReadOnly="True" />
<DataGridTextColumn Header="Title" Binding="{Binding Title}" IsReadOnly="True" />
<DataGridTextColumn Header="Description" Binding="{Binding Description}" IsReadOnly="True" />
<DataGridTextColumn Header="Type" Binding="{Binding Tag}" IsReadOnly="True" />
</DataGrid.Columns>
</DataGrid>