key: WPF, RadRichTextBox, RadDocument
I did the following steps to print merged RadDocument but it does not print and calling Print method hangs on forever. I had to kill the process. Printing 1 Document works fine but same issue happens when I try to print 2 merged documents.
1. I am merging a list of RadDocuments in to one RadDocument using methods answered in this forum.
2. Then setting RadRichTextBox’s document to the above created merged RadDocument.
3. Then printing using RadRichTextBox’s print method. radRichTextBox.Print("richtextbox", PrintMode.Native)
FYI, for Part 1) I did try this:
foreach(var document in radDocuments)
{
mergedDocument.CaretPosition.MoveToLastPositionInDocument();
mergedDocument.InsertInline(new Telerik.Windows.Documents.Model.Span(FormattingSymbolLayoutBox.PAGE_BREAK));
mergedDocument.InsertFragment(new DocumentFragment(document));
}
and also this:
RadDocument mergedDocument = new RadDocument();
foreach (RadDocument document in documents)
{
foreach (Section section in document.Sections) {
Section copySection = section.CreateDeepCopy() as Section;
document.Sections.Remove(section);
mergedDocument.Sections.Add(copySection);
}
}
Am i merging RadDocuments correctly? What could be the issue?
If this is a known Issue, then whats the best way to Merge and Print RadDocuments?
By the way : Document 1 had 7 pages and Document had 4 pages with 4 images total. It seems that as soon as I merge it does not print.
key: WPF, RadRichTextBox, RadDocument
I did the following steps to print merged RadDocument but it does not print and calling Print method hangs on forever. I had to kill the process. Printing 1 Document works fine but same issue happens when I try to print 2 merged documents.
1. I am merging a list of RadDocuments in to one RadDocument using methods answered in this forum.
2. Then setting RadRichTextBox’s document to the above created merged RadDocument.
3. Then printing using RadRichTextBox’s print method. radRichTextBox.Print("richtextbox", PrintMode.Native)
FYI, for Part 1) I did try this:
foreach(var document in radDocuments)
{
mergedDocument.CaretPosition.MoveToLastPositionInDocument();
mergedDocument.InsertInline(new Telerik.Windows.Documents.Model.Span(FormattingSymbolLayoutBox.PAGE_BREAK));
mergedDocument.InsertFragment(new DocumentFragment(document));
}
and also this:
RadDocument mergedDocument = new RadDocument();
foreach (RadDocument document in documents)
{
foreach (Section section in document.Sections) {
Section copySection = section.CreateDeepCopy() as Section;
document.Sections.Remove(section);
mergedDocument.Sections.Add(copySection);
}
}
Am i merging RadDocuments correctly? What could be the issue?
If this is a known Issue, then whats the best way to Merge and Print RadDocuments?
By the way : Document 1 had 7 pages and Document had 4 pages with 4 images total. It seems that as soon as I merge it does not print.
Thanks
private
void
gridview1(
object
sender, RowLoadedEventArgs e)
{
var myExpressionCellList = e.Row.ChildrenOfType<GridViewCell>.Where(c => c.Column.UniqueName ==
"eAbwVjKgMon1"
).toList();
foreach
(GridViewCell cell
in
myExpressCellList)
{
cell. .... ?????
}
}
<chart:RadChart x:Name="chart1" AxisElementBrush="#FFD43636">
<chart:RadChart.SeriesMappings>
<charting:SeriesMapping LegendLabel="Value">
<charting:SeriesMapping.SeriesDefinition>
<charting:LineSeriesDefinition ShowItemLabels="False"></charting:LineSeriesDefinition>
</charting:SeriesMapping.SeriesDefinition>
<charting:ItemMapping FieldName="index" DataPointMember="XValue"></charting:ItemMapping>
<charting:ItemMapping FieldName="value" DataPointMember="YValue"></charting:ItemMapping>
</charting:SeriesMapping>
</chart:RadChart.SeriesMappings>
</chart:RadChart>
Code_behind is:
List<indexsandnumbers> data = new List<indexandnumbers>();
for (int i = 1; i < 999999; i++)
{
index = i;
value = i*1.3;
data.add(new indexsandnumbers(index,value));
chart1.Itemsource = data;
chart1.rebind();
}
However, I can only see the Xvalue increase and there is no Yvalue in the chart1 after I run the application.
The only way to show the line chart is I stop the loop, I can not get the line chart during the loop.
Any helps is appreciated.
Thank you very much.