You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the *MultiSelect* property is enabled, users can make a [multiple selection in RadGridView]({%slug winforms/gridview/selection/multiple-selection%}). When using the selection UI through GridViewSelectColumn, the users will be able to select multiple rows by simply checking a checkbox. If *MultiSelect* property is *false*, the users can select only a single row/cell.
46
46
47
+
#### Row selection via checkboxes only
48
+
49
+
In some cases, the user may need to use multiple row selection through the **GridViewSelectColumn** only. The **UseCheckboxRowSelectionOnly** property defines whether the user can select rows only via the checkboxes. When **UseCheckboxRowSelectionOnly** is set to *true*, the selection only via checkboxes is allowed. Thus, if you click with the mouse over different rows they will not get selected, until you check the corresponding checkbox from the **GridViewSelectColumn**.
>note The **UseCheckboxRowSelectionOnly** will only be considered if **ShowSelectColumn** is set to *true*.
67
+
47
68
#### Hierarchy mode
48
69
49
70
**GridViewSelectColumn** is also supported when RadGridView is bound to hierarchical data and child templates in the hierarchy view are shown. In case you would like to enable this setting in a hierarchy, it is necessary to set **ShowSelectColumn** to the respective child template:
page_title: Annotations - WinForms PdfViewer Control
4
-
description: WinForms PdfViewer supports Link annotations, which means that if you open a PDF file that includes hyperlinks to absolute URIs, you can click them and have a window open, navigated to the respective address.
5
-
slug: winforms/pdfviewer/annotations
6
-
tags: annotations
7
-
published: True
8
-
position: 0
9
-
---
10
-
11
-
# Annotations
12
-
__RadPdfViewer__ supports link annotations, which means that if you open a PDF file that includes hyperlinks to absolute URIs, you can click them and have a window open, navigated to the respective address. In addition, if there are links pointing to bookmarks in the same document, the view port will be scrolled to the destination specified in the link.
13
-
14
-
The current API includes the following members, which allow customization of the default behavior or implementing custom logic:
15
-
16
-
*__AnnotationClicked__ event of __RadPdfViewer__: This event is fired when you click on an annotation such as a hyperlink. It comes handy when you want to detect or even cancel the opening of a web page. The __AnnotationEventArgs__ contain the Annotation as property and the Link itself has information of its Action, i.e. if it is a UriAction. Handling the event in the following manner will not only show the Uri of each clicked link as the text of a MessageBox, but will also cancel the default behavior.
page_title: Annotations - WinForms PdfViewer Control
4
+
description: WinForms PdfViewer supports Link annotations, which means that if you open a PDF file that includes hyperlinks to absolute URIs, you can click them and have a window open, navigate to the respective address.
5
+
slug: winforms/pdfviewer/annotations
6
+
tags: annotations
7
+
published: True
8
+
position: 0
9
+
---
10
+
11
+
# Annotations
12
+
13
+
__RadPdfViewer__ supports link annotations, which means that if you open a PDF file that includes hyperlinks to absolute URIs, you can click them and have a window open, and navigate to the respective address. In addition, if there are links pointing to bookmarks in the same document, the view port will be scrolled to the destination specified in the link.
14
+
15
+
The current API includes the following members, which allow customization of the default behavior or implementation of custom logic:
16
+
17
+
*__AnnotationClicked__ event of __RadPdfViewer__: This event is fired when you click on an annotation such as a hyperlink. It comes in handy when you want to detect or even cancel the opening of a web page. The __AnnotationEventArgs__ contains the Annotation as property and the Link itself has information of its Action, i.e. if it is a UriAction. Handling the event in the following manner will not only show the Uri of each clicked link as the text of a MessageBox but will also cancel the default behavior.
@@ -52,18 +53,64 @@ Private Sub radPdfViewer1_AnnotationClicked(sender As Object, e As Telerik.Windo
52
53
MessageBox.Show(a.Uri.ToString())
53
54
e.Handled=True
54
55
EndSub
55
-
56
-
````
57
-
58
-
{{endregion}}
59
-
60
-
*__Annotations__ property of __RadFixedDocument__ – A collection which returns all annotations in the document. For example you can retrieve all links using the following code:
*__HyperlinkClicked__ event of RadPdfViewer: This event is similar to AnnotationClicked, but it is raised only when you click on the hyperlink type annotations. It allows you to cancel the navigation to the associated URI or to modify the click action. The HyperlinkClickedEventArgs gives access to the URL, which can be manually checked if it is trusted. With the 2024 Q3 (2024.3.924), the default navigation behavior of the hyperlinks is to automatically open only valid and trusted addresses. If needed, the navigation can be canceled by either setting the __Handled__ property of the event args to _true_ or the __IsTrustedUrl__ property to _false_. Below is an example of using this event to prompt that the clicked hyperlink might be unsafe and provide the opportunity to cancel the navigation process upon receiving the end user confirmation:
e.Handled=true; MessageBoxResultResult=System.Windows.MessageBox.Show("You are about to open an executable file. Do you want to proceed", "Possible unsafe link", MessageBoxButton.YesNo, MessageBoxImage.Question);
DimResultAsMessageBoxResult=System.Windows.MessageBox.Show("You are about to open an executable file. Do you want to proceed","Possible unsafe link",MessageBoxButton.YesNo,MessageBoxImage.Question)
93
+
IfResult=MessageBoxResult.YesThen
94
+
Process.Start(NewProcessStartInfo()With{
95
+
.FileName=link,
96
+
.UseShellExecute=True
97
+
})
98
+
EndIf
99
+
EndIf
100
+
EndSub
101
+
102
+
````
103
+
104
+
{{endregion}}
105
+
106
+
107
+
*__Annotations__ property of __RadFixedDocument__ – A collection which returns all annotations in the document. For example, you can retrieve all links using the following code:
@@ -88,18 +135,18 @@ Private Iterator Function GetAllLinks(document As Telerik.Windows.Documents.Fixe
88
135
EndIf
89
136
Next
90
137
EndFunction
91
-
92
-
````
93
-
94
-
{{endregion}}
95
-
96
-
The bookmarks in terms of “docx bookmarks” are not explicitly saved in PDF files. They are persisted only if there are Link annotations to them, so you can use the snippet below to retrieve all destinations that have links to them:
The bookmarks in terms of “docx bookmarks” are not explicitly saved in PDF files. They are persisted only if there are Link annotations to them, so you can use the snippet below to retrieve all destinations that have links to them:
@@ -124,38 +171,38 @@ Private Iterator Function GetAllBookmarks(document As Telerik.Windows.Documents.
124
171
EndIf
125
172
Next
126
173
EndFunction
127
-
128
-
````
129
-
130
-
{{endregion}}
131
-
132
-
In this way it would be possible to create some UI that contains all bookmarks. Then, you could implement the same action as the one being executed when a hyperlink is clicked, i.e. scroll the document to the specific place in the document where the destination of the link is placed. The following code can be used for this purpose – navigating to a specific destination:
In this way, creating some UI containing all bookmarks would be possible. Then, you could implement the same action as the one being executed when a hyperlink is clicked, i.e. scroll the document to the specific place in the document where the destination of the link is placed. The following code can be used for this purpose – navigating to a specific destination:
Copy file name to clipboardExpand all lines: controls/richtexteditor/events.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,11 +87,15 @@ The __RadRichTextEditor__ control raises the following specific events:
87
87
88
88
* An __EventArgs__ object.
89
89
90
-
*__HyperlinkClicked__ - occurs when the current page has changed. The event handler receives two arguments:
91
-
92
-
* The sender argument contains the __RadRichTextEditor__. This argument is of type object, but can be cast to the __RadRichTextEditor__ type.
93
-
94
-
* A __HyperlinkClickedEventArgs__ object. This argument allows you to access the URL and the target of the hyperlink.
90
+
*__HyperlinkClicked__ - Occurs when the users clicks on a hyperlink in the current document. The event allows you to either cancel or replace the navigation logic. HyperlinkClicked event can be used as a confirmation from the end-user whether to proceed or not with opening a hyperlink due to security reasons. The event handler receives two arguments:
91
+
92
+
* The sender argument contains the __Span__ containing the hyperlink's content. This argument is of type object, but can be cast to the __Span__ type.
93
+
94
+
* A __HyperlinkClickedEventArgs__ object. This argument allows you to access the following properties:
95
+
- __Handled__: Get or set a value indicating whether the event is handled.
96
+
- __HyperlinkTarget__: Gets the target hyperlink.
97
+
- __URL__: Gets the URL of the hyperlink.
98
+
- __IsTrustedUrl__: Gets a value tha indicates if the URL passes the validation. If the URL is not trusted, the hyperlink will not be opened. Set this property to true to open the hyperlink. For more information see [Hyperlink]({%slug winforms/richtexteditor-/features/hyperlink%}) article.
95
99
96
100
*__IsReadOnlyChanged__ - occurs when __IsReadOnly__ value has changed. The event handler receives two arguments:
0 commit comments