Code example for HyperlinkCellClick
Good Morning:
Could you show me an example to use the HyperlinkCellClick event on VB.net for the PivotGrid control?
Thanks in advance. Carlos
Could you show me an example to use the HyperlinkCellClick event on VB.net for the PivotGrid control?
Thanks in advance. Carlos
SIGN IN To post a reply.
3 Replies
AA
Arulraj A
Syncfusion Team
March 15, 2019 06:28 AM UTC
Hi Carlos,
Thanks for using Syncfusion product.
You can achieve your requirement by setting the cell type as HyperlinkCell. HyperlinkCellClick event raised when the hyperlink cell gets clicked in the pivot grid control. This event receives an argument HyperlinkCellClickEventArgs, that contains the information about the hyperlink cell which is clicked.
|
Form1.vb
Public Sub New()
InitializeComponent()
InitializePivotGrid()
AddHandler Me.pivotGridControl1.TableModel.QueryCellInfo, AddressOf TableModel_QueryCellInfo
AddHandler Me.pivotGridControl1.TableControl.HyperlinkCellClick, AddressOf TableControl_HyperlinkCellClick
End Sub
Private Sub TableModel_QueryCellInfo(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs)
If e.RowIndex > Me.pivotGridControl1.PivotColumns.Count + (If(Me.pivotGridControl1.PivotCalculations.Count > 1, 1, 0)) AndAlso e.ColIndex > Me.pivotGridControl1.PivotRows.Count AndAlso e.Style.CellValue IsNot Nothing Then
e.Style.CellType = If(Me.checkBox1.Checked, "HyperlinkCell", "TextBox")
e.Style.Tag = Nothing
End If
End Sub
Private Sub TableControl_HyperlinkCellClick(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.PivotAnalysis.HyperlinkCellClickEventArgs)
If Me.checkBox1.Checked Then
Dim cellInfo As PivotCellInfo = Me.pivotGridControl1.PivotEngine(e.PivotCellInfo.RowIndex - 1, e.PivotCellInfo.ColumnIndex - 1)
Dim styeInfo As GridStyleInfo = Me.pivotGridControl1.TableModel(e.PivotCellInfo.RowIndex, e.PivotCellInfo.ColumnIndex)
Dim row As String = "Row index " & e.PivotCellInfo.RowIndex
Dim column As String = "Column index " & e.PivotCellInfo.ColumnIndex
Dim cellValue As String = "Cell value " & cellInfo.FormattedText
MessageBox.Show(row & vbCrLf & column & vbCrLf & cellValue)
End If
End Sub
|
Please refer our UG documentation from the following link:
Please let us know if you need any further assistance.
Arulraj A
CA
Carlos
March 15, 2019 09:19 AM UTC
Thanks Arulraj for the code example but unfortunately it does not work. When you click on a cell with a hyperlink, open the Internet Explorer and TableControl_HyperlinkCellClick event is not raised.
Regards,
Carlos
AA
Arulraj A
Syncfusion Team
March 18, 2019 12:36 PM UTC
Hi Carlos,
Sorry for the inconvenience caused.
We have merged the reported issue “Browser windows opens while clicking the hyperlink cells” in your reported version 16.1.0.37
Please find the patch file from the following location:
V16.1.0.37
|
Recommended approach – exe will perform automatic configuration
Please find the patch setup here:
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
Please find the patch assemblies alone from:
Please find the Nugets from the below location:
|
NOTE:
You can change how you receive bug fixes by navigating to the following link and updating your preferences.
https://www.syncfusion.com/support/directtrac/patches
You can change how you receive bug fixes by navigating to the following link and updating your preferences.
https://www.syncfusion.com/support/directtrac/patches
Disclaimer:
Please note that we have created this patch for the version 16.1.0.37 specifically to resolve the issues reported in this forum #143334. If you have received other patches for the same version for other products, please apply all patches in the order received.
Regards,
Arulraj A
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
CA Carlos
- Mar 14, 2019 01:09 PM UTC
- Mar 18, 2019 12:36 PM UTC