Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
sergiokml  
#1 Posted : Monday, September 2, 2019 9:02:02 PM(UTC)
sergiokml

Rank: Newbie

Groups: Registered
Joined: 7/4/2019(UTC)
Posts: 6
Location: Santiago

Hi, I've been using the class provided by you, but I run into a problem and hopefully you can help me. Every time I load the grid and add rows, the hyperlink event (CellMouseDown) fires so many times I have loaded the grid with rows. Is it possible to cancel the event so that it is triggered only once? Or would I have to instantiate the class every time I filled the grid?

Igor/10Tec  
#2 Posted : Wednesday, September 4, 2019 12:23:04 PM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,111

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
Can you publish here or send us a sample demonstrating the problem?

FYI: remove the bin and obj subfolders with compiled stuff before packing your project.
sergiokml  
#3 Posted : Wednesday, September 4, 2019 10:36:17 PM(UTC)
sergiokml

Rank: Newbie

Groups: Registered
Joined: 7/4/2019(UTC)
Posts: 6
Location: Santiago

ok
My sub:


I have 2 cols with hyperlinks:

Code:

 Private Sub HCM_CellLinkClick(ByVal sender As Object, ByVal e As HelperHyperlinkGrilla.IGHCMCellLinkClickEventArgs) Handles HCM.CellLinkClick
        Dim c As String = e.Cell.Text
        If c.StartsWith("D") Then 'Es carta
            Dim cm As DTOCuadroFacturacion = cartasHyperlinks.Find(Function(x) x.LetterCode = c)
            Process.Start($"{cm.LetterFile}")
            Exit Sub
        End If
        Process.Start($"{HelperGlobalVar.BaseUri}pagos/instrucciones/{c}")
        e.Cell.Row.Selected = True
    End Sub




Code:

Private Sub HCM_CellIsLink(ByVal sender As Object, ByVal e As HelperHyperlinkGrilla.iGHCMCellIsLinkEventArgs) Handles HCM.CellIsLink
        Dim c As String = CType(e.Cell.Value, String)
        If c IsNot Nothing Then
            If c.StartsWith("D") AndAlso c.Length = 7 Then 'Es carta
                e.IsLink = True
            End If
        End If
        If instruccionesHyperlink.Contains(c) Then
            e.IsLink = True
        End If
    End Sub


This event should shoot 1 time and not 2, 3 or plus. in both cases, my two columns wtih hyperlinks happen the same thing. (one clik= 2,3,4,etc.... browser page open) its weird but in debugger time doesn't happen.

Code:

   Private Sub FGrid_CellMouseDown(ByVal sender As Object, ByVal e As iGCellMouseDownEventArgs)
        If fPointerOverLink Then
            ' do not edit the cell if it has been already selected
            e.DoDefault = False
            ' just select the cell
            FGrid.SetCurCell(e.RowIndex, e.ColIndex)
            ' this is the place for your code that processes the link click
            RaiseEvent CellLinkClick(Me, New IGHCMCellLinkClickEventArgs(FGrid.Cells(e.RowIndex, e.ColIndex)))
        End If
    End Sub

Edited by user Thursday, September 5, 2019 7:45:26 PM(UTC)  | Reason: Not specified

Igor/10Tec  
#4 Posted : Friday, September 6, 2019 11:59:58 AM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,111

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
Is it a problem to send us a sample to reproduce the problem we can launch on our pc? We need to see the issue 'live'.
sergiokml  
#5 Posted : Friday, September 6, 2019 8:51:29 PM(UTC)
sergiokml

Rank: Newbie

Groups: Registered
Joined: 7/4/2019(UTC)
Posts: 6
Location: Santiago

ok. i send you the video when the event repeat.

https://drive.google.com...yHndaZx/view?usp=sharing

in mode debugger that no happen...

Edited by user Friday, September 6, 2019 8:53:07 PM(UTC)  | Reason: Not specified

Igor/10Tec  
#6 Posted : Monday, September 9, 2019 7:13:11 AM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,111

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
Please, understand me. I need a sample to reproduce the problem on my pc under the debugger. Can you prepare and send me one? Or can the problem be reproduced in the public extra sample?
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.