I am trying to figure out if updating different packages in my project is possible and would like to find the documentation for my Telerik version. I have a old version and can't find relevant information anywhere.
Is there some legacy page i can view?
public void WriteToWordDocumentContinued(){
m_document = new RadFlowDocument();
m_editor = new RadFlowDocumentEditor(m_document);
Section section = new Section(m_document);
section.HasDifferentFirstPageHeaderFooter = true;
section.PageMargins = new Telerik.Windows.Documents.Primitives.Padding(56.69, 94.49, 47.24, 66.14);
m_document.Sections.Add(section);
m_document.StyleRepository.AddBuiltInStyle(BuiltInStyleNames.GetHeadingStyleIdByIndex(1));
Style MainTitle = new Style("MainTitle", StyleType.Character) { };
MainTitle.CharacterProperties.UnderlinePattern.LocalValue = UnderlinePattern.Single;
MainTitle.CharacterProperties.FontFamily.LocalValue = new ThemableFontFamily("Arial");
MainTitle.CharacterProperties.FontSize.LocalValue = 32;
MainTitle.CharacterProperties.FontWeight.LocalValue = System.Windows.FontWeights.Bold;
m_document.StyleRepository.Add(MainTitle);
Style HeaderParagraphStyle = new Style("HeaderParagraphStyle", StyleType.Paragraph) { };
HeaderParagraphStyle.ParagraphProperties.LineSpacing.LocalValue = 16;
HeaderParagraphStyle.ParagraphProperties.LineSpacingType.LocalValue = HeightType.Exact;
HeaderParagraphStyle.ParagraphProperties.SpacingAfter.LocalValue = 0;
HeaderParagraphStyle.ParagraphProperties.SpacingBefore.LocalValue = 0;
Style HeaderTitleStyle = new Style("HeaderTitleStyle", StyleType.Paragraph) { };
HeaderTitleStyle.ParagraphProperties.LineSpacing.LocalValue = 21.4;
HeaderTitleStyle.ParagraphProperties.LineSpacingType.LocalValue = HeightType.Exact;
HeaderTitleStyle.ParagraphProperties.SpacingAfter.LocalValue = 0;
HeaderTitleStyle.ParagraphProperties.SpacingBefore.LocalValue = 0;
HeaderTitleStyle.ParagraphProperties.TextAlignment.LocalValue = Alignment.Right;
HeaderParagraphStyle.ParagraphProperties.TextAlignment.LocalValue = Alignment.Right;
m_document.StyleRepository.Add(HeaderParagraphStyle);
Style HeaderCharacterStyle = new Style("HeaderCharacterStyle", StyleType.Paragraph) { };
HeaderCharacterStyle.CharacterProperties.FontFamily.LocalValue = new ThemableFontFamily("Arial");
HeaderCharacterStyle.CharacterProperties.FontSize.LocalValue = 16;
m_document.StyleRepository.Add(HeaderCharacterStyle);
Style SubTitle = new Style("SubTitle", StyleType.Character) { };
SubTitle.CharacterProperties.UnderlinePattern.LocalValue = UnderlinePattern.Single;
SubTitle.CharacterProperties.FontFamily.LocalValue = new ThemableFontFamily("Arial");
SubTitle.CharacterProperties.FontSize.LocalValue = 16;
SubTitle.CharacterProperties.FontWeight.LocalValue = System.Windows.FontWeights.Bold;
m_document.StyleRepository.Add(SubTitle);
Style TopLines = new Style("TopLines", StyleType.Character) { };
TopLines.CharacterProperties.FontFamily.LocalValue = new ThemableFontFamily("Arial");
TopLines.CharacterProperties.FontSize.LocalValue = 16;
TopLines.CharacterProperties.FontWeight.LocalValue = System.Windows.FontWeights.Bold;
m_document.StyleRepository.Add(TopLines);
}
This is just minified version of the method where I am trying to instantiate my RadFlowDocument object. This method is being called in a parent class, even If I try to pass RadFlowDocument object from that class, it still causes the UI to break.
Hello all
(sorry for my english)
I tried to use the example 5 and 6 on this page :
But it don't work.
"MERGEFIELD" work but "MERGEFIELD TableStart:" don't.
What did i do wrong ?
Thank you very much for answers :)
Please see Below the code :
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.IO
Imports System.Linq
Imports System.Reflection
Imports System.Text
Imports System.Windows
Imports System.Windows.Forms
Imports Telerik.Windows.Documents.Common.FormatProviders
Imports Telerik.Windows.Documents.Flow.FormatProviders.Docx
Imports Telerik.Windows.Documents.Flow.FormatProviders.Html
Imports Telerik.Windows.Documents.Flow.FormatProviders.Rtf
Imports Telerik.Windows.Documents.Flow.FormatProviders.Txt
Imports Telerik.Windows.Documents.Flow.Model
Imports Telerik.Windows.Documents.Flow.Model.Editing
Imports Telerik.Windows.Documents.Flow.Model.Styles
Imports Telerik.Windows.Documents.Spreadsheet.Model
Imports Telerik.Windows.Documents.Core
Imports Telerik.Windows.Documents.Flow
Imports Telerik.WinForms.Documents.FormatProviders.Pdf
Module M_TestGenerationDoc
Private ReadOnly providers As Dictionary(Of IFormatProvider(Of RadFlowDocument), String)
Private chemin As String = "C:\Temp\MODELE\"
Private selectedFormat As String = "Docx"
Public Sub S_TestFusion()
Dim document As RadFlowDocument = New RadFlowDocument()
Dim editor As RadFlowDocumentEditor = New RadFlowDocumentEditor(document)
editor.InsertParagraph()
editor.InsertField("MERGEFIELD TeamName", "")
editor.InsertParagraph()
editor.InsertText("Players:")
Dim playersTable As Table = editor.InsertTable(2, 2)
playersTable.PreferredWidth = New TableWidthUnit(TableWidthUnitType.Percent, 100)
document.StyleRepository.AddBuiltInStyle(BuiltInStyleNames.TableGridStyleId)
playersTable.StyleId = BuiltInStyleNames.TableGridStyleId
playersTable.Rows(0).Cells(0).Blocks.AddParagraph().Inlines.AddRun("First Name")
playersTable.Rows(0).Cells(1).Blocks.AddParagraph().Inlines.AddRun("Last Name")
Dim firstNameParagraph As Paragraph = playersTable.Rows(1).Cells(0).Blocks.AddParagraph()
editor.MoveToParagraphStart(firstNameParagraph)
editor.InsertField("MERGEFIELD TableStart:Players", "")
editor.InsertField("MERGEFIELD FirsName", "")
Dim lastNameParagraph As Paragraph = playersTable.Rows(1).Cells(1).Blocks.AddParagraph()
editor.MoveToParagraphStart(lastNameParagraph)
editor.InsertField("MERGEFIELD LastName", "")
editor.InsertField("MERGEFIELD TableEnd:Players", "")
Dim mailMergeResult As RadFlowDocument = document.MailMerge(GetTeams())
SaveDocument(mailMergeResult, selectedFormat)
MsgBox("Fichier sauvegardé")
End Sub
Public Function SaveDocument(ByVal document As RadFlowDocument, ByVal selectedFormat As String) As Boolean
Dim formatProvider As IFormatProvider(Of RadFlowDocument) = Nothing
Try
Select Case selectedFormat
Case "Docx"
formatProvider = New DocxFormatProvider()
Case "Rtf"
formatProvider = New RtfFormatProvider()
Case "Html"
formatProvider = New HtmlFormatProvider()
Case "Txt"
formatProvider = New TxtFormatProvider()
Case "Pdf"
formatProvider = New PdfFormatProvider()
End Select
If formatProvider Is Nothing Then
Return False
End If
Dim dialog As SaveFileDialog = New SaveFileDialog()
dialog.FileName = "Result"
dialog.Filter = String.Format("{0} files|*{1}|All files (*.*)|*.*", selectedFormat, formatProvider.SupportedExtensions.First())
dialog.FilterIndex = 1
Using output As Stream = File.OpenWrite(chemin + "test_fusion.docx")
formatProvider.Export(document, output)
End Using
Return True
Catch ex As Exception
MsgBox(ex.Message)
Return False
End Try
End Function
Public Function GetTeams() As List(Of Team)
Dim teams = New List(Of Team)()
Dim team1 = New Team()
team1.TeamName = "Team 1"
team1.Players.Add(New Player() With {
.FirsName = "John",
.LastName = "Baker"
})
team1.Players.Add(New Player() With {
.FirsName = "Sam ",
.LastName = "Wayne"
})
teams.Add(team1)
Dim team2 = New Team()
team2.TeamName = "Team 2"
team2.Players.Add(New Player() With {
.FirsName = "Patrick",
.LastName = "Gibbs"
})
team2.Players.Add(New Player() With {
.FirsName = "Oscar",
.LastName = "Stevens"
})
teams.Add(team2)
Return teams
End Function
Public Class Team
Public Property TeamName As String
Public Property Players As List(Of Player)
Public Sub New()
Me.Players = New List(Of Player)()
End Sub
End Class
Public Class Player
Public Property FirsName As String
Public Property LastName As String
End Class
End Module
Hello,
We are having an issue with our application on high DPI monitors. When the PdfViewer loads a document, it resizes the whole application. The issue only occurs with the published application. It does not happen on debug mode. See attached video.
Thank you,
video: https://drive.google.com/file/d/1N_JkCRQ6GNOYgsL3PrwOYm0hOBPpaGn8/view?usp=sharing
Hi all,
I'm an onbording programmer and also new to Telerik. I'm taking a look at Telerik products. More specificaly at the Windows form TreeView from VS 2019 VB.NET.
I just tried to create a new Windows form project and added a RadTreeView. I try to add nodes but they don't show up in the TreeView. What I'm I doing wrong ?
I'm attaching a picture of the verry simple code with hope this can help you.
This is my first time here so I'm not sure if:
- I provide appropriate information
- I'm at the right place for that type of support
Just let me know!
Erik
Program uses spell check and autocomplete on a radtextbox control.
In order to use ILMerge, I have:
Telerik.WinControls.RadTypeResolver.Instance.ResolveTypesInCurrentAssembly = True
Near top of main form.
References in Solution Explorer show:
Telerik.WinControls
Telerik.WinControls.SpellChecker
Telerik.WinControls.UI
Telerik.WinControls.Design
However, when I build the program, I find just about every major Telerik assembly dll, From PdfView, to RadWebCam.
I've searched the entire solution, and can't figure out where all those references are coming from.
Where did I go wrong?
Hi Team,
I am unable to find the direct download links for older versions of telerik. I am looking for for 2018 R3 version for windows.
Thanks,
Vijay
Hi,
I have three GridViewComboBoxColumn in RadGridView. Each Combobox column has display name and selected value code. When I assign the value, corresponding values are assigning correctly. But when when I fetch the row, Code value is coming as null and code value is displaying in name. I have attached the image.
The following code I have used to bind data to GridViewComboBoxColumn.
((GridViewComboBoxColumn)this.dataGrid.Columns["Company_Name"]).ItemsSource = CompanyList;
((GridViewComboBoxColumn)this.dataGrid.Columns["Company_Name"]).DisplayMemberPath = "Company_Name";
((GridViewComboBoxColumn)this.dataGrid.Columns["Company_Name"]).SelectedValueMemberPath = "Company_Code_Hdn";
Hi,
I'm currently new to Telerik, which my company used in the past. One of my first task is to upgrade and copy a project by manually rewriting the files to avoid publishing issues. I came across an error which I can't seem to find the solution. It appears that Pdf class is no longer under Telerik.Windows. I see that there's a Telerik.Pdf now but I can't seem to figure out what to use to make my project error-free. Can anyone help me with this?
Visual Studio Error at the beginning of my form:
using Telerik.Windows.Pdf.Documents.Fixed.Model.Navigation;
Severity: Error, Code: CS0234, Description: The type or namespace name 'Pdf' does
not exist in the namespace 'Telerik.Windows' (are you missing an assembly
reference?), Project: Label Printing PVC, File:C:\Users\Lily\Documents\Visual Studio
2017\Projects\Label Printing PVC\Label Printing PVC\APrintLabelSystemProdGroupNew.cs, Line 10, Suppression State: Active