Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
405
Hand Cursor on URL FormattedLinkEditor not showing up?
posted

Hello,

I'm wondering what property might make the cursor NOT change to a hand when hovering over a URL in an UltraGrid... the grid is setup as follows:  

Me.ugPhones.DataSource = New List(Of PhoneRow)

ugPhones.Rows.Band.Columns("PhoneNumber").Style = Infragistics.Win.UltraWinGrid.ColumnStyle.URL

formattedLinkEditor = DirectCast(Me.ugPhones.Rows.Band.Columns("PhoneNumber").Editor, FormattedLinkEditor)

AddHandler formattedLinkEditor.LinkClicked, AddressOf formattedLinkEditor_LinkClicked

This makes it so the text in the column is correctly formatted as a URL and the click event of the URL is handled... and in a small test app the cursor correctly changes to a hand when hovering over the URL, but in another app, it does not.  I've so far been unable to find any code differences that might change the grid so that the cursor wouldn't change to the hand.

 

Any ideas for me to look for? 

Thanks!

  • 200
    Suggested Answer
    posted in reply to Mike Saltzman

    I was having the same problem today with a column bound to an integer field (a table's primary key).

    Apparently, the cursor will not change to the hand unless the column is a string. I tried setting a date column to the URL style and although it appeared with the underline, the cursor would also not change when I moused over the cell values.

    To "fix" my problem, I changed my datatable and SQL query to make the integer column a string and it now works as I expect it. Note - I am using conditional formatting of the background color on that column, but it still didn't work when I removed it, and works when I added it back after changing the column to a string.

    Shouldn't the URL hand icon work for any datatype?

    Alexi

  • 469350
    Suggested Answer
    Offline posted

    Hi,

    I can only think of two things.

    1) The column is disabled. There are a number of ways you could disable it. This KB article has a list: HOWTO:How can I make a grid or a column, row, or cell in the UltraWinGrid disabled or read-only?

    2) You are assigning an Appearance to the cell with a Cursor setting. This might be done in code, or perhaps through Application Styling.

     

  • 405
    posted

    If it helps, here is the ugPhones code from the designer:

    '
    'ugPhones
    '
    Appearance1.BackColor = System.Drawing.SystemColors.Window
    Appearance1.BorderColor = System.Drawing.SystemColors.InactiveCaption
    Me.ugPhones.DisplayLayout.Appearance = Appearance1
    Me.ugPhones.DisplayLayout.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid
    Me.ugPhones.DisplayLayout.CaptionVisible = Infragistics.Win.DefaultableBoolean.[False]
    Appearance2.BackColor = System.Drawing.SystemColors.ActiveBorder
    Appearance2.BackColor2 = System.Drawing.SystemColors.ControlDark
    Appearance2.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical
    Appearance2.BorderColor = System.Drawing.SystemColors.Window
    Me.ugPhones.DisplayLayout.GroupByBox.Appearance = Appearance2
    Appearance3.ForeColor = System.Drawing.SystemColors.GrayText
    Me.ugPhones.DisplayLayout.GroupByBox.BandLabelAppearance = Appearance3
    Me.ugPhones.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid
    Appearance4.BackColor = System.Drawing.SystemColors.ControlLightLight
    Appearance4.BackColor2 = System.Drawing.SystemColors.Control
    Appearance4.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal
    Appearance4.ForeColor = System.Drawing.SystemColors.GrayText
    Me.ugPhones.DisplayLayout.GroupByBox.PromptAppearance = Appearance4
    Me.ugPhones.DisplayLayout.MaxColScrollRegions = 1
    Me.ugPhones.DisplayLayout.MaxRowScrollRegions = 1
    Appearance5.BackColor = System.Drawing.SystemColors.Window
    Appearance5.ForeColor = System.Drawing.SystemColors.ControlText
    Me.ugPhones.DisplayLayout.Override.ActiveCellAppearance = Appearance5
    Appearance6.BackColor = System.Drawing.SystemColors.Highlight
    Appearance6.ForeColor = System.Drawing.SystemColors.HighlightText
    Me.ugPhones.DisplayLayout.Override.ActiveRowAppearance = Appearance6
    Me.ugPhones.DisplayLayout.Override.BorderStyleCell = Infragistics.Win.UIElementBorderStyle.Dotted
    Me.ugPhones.DisplayLayout.Override.BorderStyleRow = Infragistics.Win.UIElementBorderStyle.Dotted
    Appearance7.BackColor = System.Drawing.SystemColors.Window
    Me.ugPhones.DisplayLayout.Override.CardAreaAppearance = Appearance7
    Appearance8.BorderColor = System.Drawing.Color.Silver
    Appearance8.TextTrimming = Infragistics.Win.TextTrimming.EllipsisCharacter
    Me.ugPhones.DisplayLayout.Override.CellAppearance = Appearance8
    Me.ugPhones.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.EditAndSelectText
    Me.ugPhones.DisplayLayout.Override.CellPadding = 0
    Appearance9.BackColor = System.Drawing.SystemColors.Control
    Appearance9.BackColor2 = System.Drawing.SystemColors.ControlDark
    Appearance9.BackGradientAlignment = Infragistics.Win.GradientAlignment.Element
    Appearance9.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal
    Appearance9.BorderColor = System.Drawing.SystemColors.Window
    Me.ugPhones.DisplayLayout.Override.GroupByRowAppearance = Appearance9
    Appearance10.TextHAlignAsString = "Left"
    Me.ugPhones.DisplayLayout.Override.HeaderAppearance = Appearance10
    Me.ugPhones.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti
    Me.ugPhones.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.WindowsXPCommand
    Appearance11.BackColor = System.Drawing.SystemColors.Window
    Appearance11.BorderColor = System.Drawing.Color.Silver
    Me.ugPhones.DisplayLayout.Override.RowAppearance = Appearance11
    Me.ugPhones.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.[False]
    Appearance12.BackColor = System.Drawing.SystemColors.ControlLight
    Me.ugPhones.DisplayLayout.Override.TemplateAddRowAppearance = Appearance12
    Me.ugPhones.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill
    Me.ugPhones.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate
    Me.ugPhones.DisplayLayout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy
    Me.ugPhones.Dock = System.Windows.Forms.DockStyle.Fill
    Me.ugPhones.Location = New System.Drawing.Point(0, 25)
    Me.ugPhones.Name = "ugPhones"
    Me.ugPhones.Size = New System.Drawing.Size(739, 227)
    Me.ugPhones.TabIndex = 4
    Me.ugPhones.TabStop = False
    Me.ugPhones.Text = "UltraGrid1"