Radlistview itemmouseclick fail

18 posts, 0 answers
  1. Jhon
    Jhon avatar
    18 posts
    Member since:
    Jun 2017

    Posted 26 Oct Link to this post

    Hi, I am using version 17.2.502.0 in which I have encountered a problem with the radlistview control in its views (iconview, listview, detailsview), in my case I am using it with iconview; the problem is specifically that sometimes does not select the item when you click and you have to press up to 4 times to select an item this asu prevents the itemmouseclick event from performing correctly.

    I hope your support, thank you.

    note: I'm using the google translator, apologies from the case.

     

    Private Sub CargarArtistas(ByVal lw As RadListView)
            Try
                lw.ItemSize = New Size(180, 180)
                lw.AllowArbitraryItemHeight = True
                lw.ItemSpacing = 3
                lw.EnableKineticScrolling = True
                lw.ListViewElement.ViewElement.ViewElement.Margin = New Padding(3, 3, 3, 3)
                lw.ListViewElement.ViewElement.Orientation = Orientation.Horizontal
                'lw.ListViewElement.DrawFill = False
     
                Me.Listar_VideoTableAdapter.Fill(Me.DsArtistas.Listar_Video, Genero_Predeterminado, "VIDEO")
                lw.DataSource = Me.ListarVideoBindingSource
     
                lw.DisplayMember = "Artista"
                'lw.EnableSorting = True
                'Dim sort As New SortDescriptor("Artista", ListSortDirection.Ascending)
                'lw.SortDescriptors.Add(sort)
            Catch ex As Exception
                MsgBox(ex.Message, MsgBoxStyle.Critical, MsgboxTitle)
            End Try
        End Sub
        Private Sub Frm_Testeo_Load(sender As Object, e As EventArgs) Handles MyBase.Load
            Try
                CargarArtistas(lwVideo)
                ThemeResolutionService.LoadPackageFile(Application.StartupPath & "\Themes\CSI_THEME_LW.tssp")
                lwVideo.ThemeName = "CSI_THEME_LW"
            Catch ex As Exception
                MsgBox(ex.Message, MsgBoxStyle.Critical, MsgboxTitle)
            End Try
        End Sub
        Private Sub lwVideo_ItemDataBound(sender As Object, e As ListViewItemEventArgs) Handles lwVideo.ItemDataBound
            Try
                Dim rowView As DataRowView = TryCast(e.Item.DataBoundItem, DataRowView)
                Dim icon As Image
                icon = Image.FromFile(rowView.Row("Foto"))
                e.Item.Image = icon.GetThumbnailImage(180, 180, Nothing, IntPtr.Zero)
            Catch ex As Exception
                MsgBox(ex.Message, MsgBoxStyle.Critical)
            End Try
        End Sub
        Private Sub Show_FormArtistas(ByVal lw As RadListView)
            Try
                Codigo_Genero_Seleccionado = TryCast(lw.SelectedItem.Item("CodGenero").ToString, String)
                Genero_Seleccionado = TryCast(lw.SelectedItem.Item("Genero").ToString, String)
                Artista_Seleccionado = TryCast(lw.SelectedItem.Item("Artista").ToString, String)
                Foto_Seleccionado = TryCast(lw.SelectedItem.Item("Foto").ToString, String)
                Formato_Seleccionado = TryCast(lw.SelectedItem.Item("Tipo").ToString, String)
     
                Formulario = "Artistas"
     
                Dim oFrm_Gray As New Frm_Gray
                oFrm_Gray.BackColor = Color.FromArgb(BackColor_GUI)
                oFrm_Gray.Opacity = 0.5
                oFrm_Gray.ShowDialog()
     
            Catch ex As Exception
                MsgBox(ex.Message, MsgBoxStyle.Critical, MsgboxTitle)
            End Try
        End Sub
        Private Sub lwVideo_ItemMouseClick(sender As Object, e As ListViewItemEventArgs) Handles lwVideo.ItemMouseClick
            Try
                Show_FormArtistas(lwVideo)
            Catch ex As Exception
                MsgBox(ex.Message, MsgBoxStyle.Critical, MsgboxTitle)
            End Try
        End Sub
        Private Sub lwVideo_VisualItemCreating(sender As Object, e As ListViewVisualItemCreatingEventArgs) Handles lwVideo.VisualItemCreating
            Try
                e.VisualItem = New CustomVisualItem
            Catch ex As Exception
                MsgBox(ex.Message, MsgBoxStyle.Critical, MsgboxTitle)
            End Try
        End Sub
  2. Jhon
    Jhon avatar
    18 posts
    Member since:
    Jun 2017

    Posted 28 Oct Link to this post

    PLEASE SUPPORT.
  3. Dess
    Admin
    Dess avatar
    2222 posts

    Posted 30 Oct Link to this post

    Hello, Jhon,

    Thank you for writing.  

    According to the provided information and screenshot, it seems that you use custom visual items. Note that it would be necessary to disable the mouse handling for the custom inner elements and notify the parent visual item for the mouse input. It is necessary to set the ShouldHandleMouseInput property to false and the NotifyParentOnMouseInput property to true for all custom elements that you add. Thus, the respective selection events will be fired as expected.

    Off topic, note that most of the forum threads are reviewed by Telerik representatives and sometimes we address the questions asked by our customers in the forums as well. However, a post in the forum doesn't guarantee you a response from the Telerik support team. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

    I hope this information helps. Should you have further questions I would be glad to help.

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  4. Jhon
    Jhon avatar
    18 posts
    Member since:
    Jun 2017

    Posted 30 Oct in reply to Dess Link to this post

    Dear, Thank you for answering the problem is that the control is selectable so the error is sometimes made difficult by the user interaction; likewise I have reviewed the entire forum in search of a solution and / or that another user has presented the problem.

    now the problem is presented in all its views (listview, iconview, details) with or without custom view because I have tried everything before resorting to the forum, the problem is especially that sometimes an item can not be selected therefore can not Shoot the mouseitemclick event.

    attached personalization code. thanks for your support.

     

    Public Class CustomVisualItem
        'Friend Class CustomVisualItem
        Inherits IconListViewVisualItem
        Private imageElement As LightVisualElement
        Private artistElement As LightVisualElement
        Private generElement As LightVisualElement
        'Private ratingElement As RatingElement
        Private stackLayout As StackLayoutPanel
        Public Sub New()
        End Sub
        Protected Overrides ReadOnly Property ThemeEffectiveType() As Type
            Get
                Return GetType(IconListViewVisualItem)
            End Get
        End Property
        Protected Overrides Sub CreateChildElements()
            MyBase.CreateChildElements()
     
            stackLayout = New StackLayoutPanel()
            stackLayout.Orientation = Orientation.Vertical
     
     
            imageElement = New LightVisualElement()
            imageElement.ShouldHandleMouseInput = False
            imageElement.NotifyParentOnMouseInput = True
            imageElement.DrawText = False
            imageElement.ImageLayout = ImageLayout.Stretch
            'imageElement.Size = New Size(200, 200)
            imageElement.StretchVertically = False
            imageElement.Margin = New Padding(3, 3, 3, 0)
            imageElement.DrawBorder = True
            'imageElement.DrawFill = True
            imageElement.BorderGradientStyle = GradientStyles.Solid
            imageElement.BorderColor = Color.White
            stackLayout.Children.Add(imageElement)
     
     
            artistElement = New LightVisualElement()
            artistElement.ShouldHandleMouseInput = False
            artistElement.NotifyParentOnMouseInput = True
            'artistElement.DrawFill = True
            artistElement.TextAlignment = ContentAlignment.MiddleCenter
            artistElement.Margin = New Padding(3, 0, 3, 0)
            artistElement.Font = New Font("Eras Bold ITC", 12, FontStyle.Bold, GraphicsUnit.Point)
            artistElement.ForeColor = Color.FromArgb(255, 255, 0)
            stackLayout.Children.Add(artistElement)
     
     
            generElement = New LightVisualElement()
            generElement.ShouldHandleMouseInput = False
            generElement.NotifyParentOnMouseInput = True
            'artistElement.DrawFill = True
            generElement.TextAlignment = ContentAlignment.MiddleCenter
            generElement.Margin = New Padding(3, 0, 3, 0)
            generElement.Font = New Font("Eras Bold ITC", 9, FontStyle.Bold, GraphicsUnit.Point)
            generElement.ForeColor = Color.FromArgb(255, 255, 255)
            stackLayout.Children.Add(generElement)
     
     
            Me.Children.Add(stackLayout)
     
     
            Me.Padding = New Padding(2)
            Me.Shape = New RoundRectShape(3)
            Me.BorderColor = Color.FromArgb(255, 255, 255)
            Me.BorderBoxStyle = Telerik.WinControls.BorderBoxStyle.OuterInnerBorders
            Me.DrawBorder = True
            Me.DrawFill = True
            Me.BackColor = Color.FromArgb(186, 35, 37)
            Me.GradientStyle = GradientStyles.Solid
     
        End Sub
        Protected Overrides Sub SynchronizeProperties()
            MyBase.SynchronizeProperties()
            'Dim icon As Image = Image.FromFile(Me.Data("Foto").ToString)
            'Me.imageElement.Image = icon.GetThumbnailImage(180, 180, Nothing, IntPtr.Zero)
     
            Me.imageElement.Image = Me.Data.Image
            Me.Image = Nothing
            Me.artistElement.Text = Me.Data("Artista").ToString
            Me.generElement.Text = Me.Data("Genero").ToString
            'Dim rating As Double = 7 + 3.9 * CDbl(Me.Data("Rating"))
            'Me.ratingElement.Rating = CInt(Fix(rating))
        End Sub
        Protected Overloads Overrides Function MeasureOverride(ByVal availableSize As SizeF) As SizeF
            Dim measuredSize As SizeF = MyBase.MeasureOverride(availableSize)
     
            Me.stackLayout.Measure(measuredSize)
     
            Return measuredSize
        End Function
        Protected Overrides Function ArrangeOverride(ByVal finalSize As SizeF) As SizeF
            MyBase.ArrangeOverride(finalSize)
     
            Me.stackLayout.Arrange(New RectangleF(PointF.Empty, finalSize))
     
            Return finalSize
        End Function
    End Class
  5. Dess
    Admin
    Dess avatar
    2222 posts

    Posted 31 Oct Link to this post

    Hello, Jhon,    

    Thank you for writing back. 

    Following the provided information and sample code snippet, I was unable to reproduce the issue you are facing. Please refer to the attached gif file illustrating the behavior on my end with the specified version. Am I missing something? I have attached my sample project. Could you please specify the exact steps how to reproduce the problem? once we replicate the problem locally we can investigate the precise case. Thank you in advance. 

    I am looking forward to your reply.

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  6. Jhon
    Jhon avatar
    18 posts
    Member since:
    Jun 2017

    Posted 31 Oct in reply to Dess Link to this post

    Dear, the problem arises when using a touch monitor and selecting the djunta video items of a test performed with the example attached by you, thank you for your time.

    regards

    Demo Gif

  7. Dess
    Admin
    Dess avatar
    2222 posts

    Posted 01 Nov Link to this post

    Hello, Jhon,    

    Thank you for writing back. 

    I have tested on a touch device with my sample project. Please refer to the attached sample video. The selection seems to work as expected on my end. What is the exact device on which you run the application? What is the OS? What version of the Telerik UI for WinForms suite do you use? Each detailed information that can be useful to replicate the problem locally would be greatly appreciated. Thank you in advance.

    I am looking forward to your reply.

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  8. Jhon
    Jhon avatar
    18 posts
    Member since:
    Jun 2017

    Posted 02 Nov in reply to Dess Link to this post

    Dear, attached as requested:
    - Monitor ELO 1509L of 15.6 inches
    - Operating System Windows 8 Pro 32 bits
    - Version Telerik UI for WinForms 17.2.502.0

    Also thank you infinitely for your support.

    regards
  9. Jhon
    Jhon avatar
    18 posts
    Member since:
    Jun 2017

    Posted 03 Nov Link to this post

    Dear, I forgot to mention that I use Visual Studio 2012 and Framework 4.0.

    regards
  10. Dess
    Admin
    Dess avatar
    2222 posts

    Posted 06 Nov Link to this post

    Hello, Jhon,    

    Thank you for writing back. 

    I have tested on two different touch devices one of which is with Windows 8 32 bits. My sample project works as expected and the ItemMouseClick event is fired every time I touch with the finger. Is the problem reproducible on other devices or the problem exists only on your touch device? We don't have control how the device sends the messages to the control. Once the message is received, RadListView fires the respective event. 

    I am looking forward to your reply.

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  11. Jhon
    Jhon avatar
    18 posts
    Member since:
    Jun 2017

    Posted 07 Nov in reply to Dess Link to this post

    Dear, I have updated to the last version which solved the problem I hope that my experience helps the rest of users to solve their doubts.

    I appreciate the time and the support provided, thank you.

    attached news of the version.

    RadListView

    FIXED
    Improve the layout logic of the SimpleListViewVisualItem in order to wrap children properly.
    Crash when binding RadListView to a collection of objects where the DisplayName attribute differs from field name.
    DataTable.Caption property is not respected in RadListView's columns.

  12. Dess
    Admin
    Dess avatar
    2222 posts

    Posted 08 Nov Link to this post

    Hello, Jhon,    

    Thank you for writing back. 

    I am glad that the problem you were facing is now resolved. I would recommend you to use our support ticketing system if you have any future inquiries. Thus, our support staff will gladly assist you. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

    I hope this information helps. 

     Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  13. Jhon
    Jhon avatar
    18 posts
    Member since:
    Jun 2017

    Posted 18 Nov in reply to Dess Link to this post

    Dear, first the apologies of the case to reopen the subject; I commented that I started to have the same problem with the mouse_itemclick of the listview control but I found the problem whose origin is the property EnableKineticScrolling = True, when lw.EnableKineticScrolling is activated to be able to use the control with the touch screen and simulate the tactile slip occurs The problem mentioned above stops responding correctly the item_mouseclick event, I hope your help thanks.

    Note: I have activated lw.EnableKineticScrolling = True in your sample project and the same problem occurs.


    regards
  14. Dess
    Admin
    Dess avatar
    2222 posts

    Posted 21 Nov Link to this post

    Hello, Jhon,    

    Thank you for writing back. 

    When you set the EnableKineticScrolling property to true, note that you will be able to scroll RadListView with mouse moving while the left mouse button is pressed. Each slight mouse moving will activate the kinetic scrolling and the ItemMouseClick event won't be fired. However, if you just click without any moving at all the event is fired. I have attached a sample video illustrating how the kinetic scrolling works together with the ItemMouseClick event.

    I hope this information helps. If you have any additional questions, please let me know. 

     Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  15. Jhon
    Jhon avatar
    18 posts
    Member since:
    Jun 2017

    Posted 21 Nov in reply to Dess Link to this post

    Dear:
    Attached video, likewise mention that the control works very well when the EnableKineticScrolling property is disabled and the screen is static, on the other hand when EnableKineticScrolling is activated and the screen is static it does not execute correctly. I hope you can help me thanks.

     

    https://vimeo.com/243128756

  16. Dess
    Admin
    Dess avatar
    2222 posts

    Posted 22 Nov Link to this post

    Hello, Jhon,    

    Thank you for writing back. 

    It seems that the provided link refers to a wrong video. Without replicating the issue locally we can make only conjectures what causes the issue on your end. We don't have control how the device sends the messages to the OS. Once the message is received, RadListView fires the respective event. We expect that the message is sent. If it is not sent by the device, we can't process it. Is the problem reproducible without using the custom items? Have you tested on a second touch device? 

    I am looking forward to your reply.

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  17. Jhon
    Jhon avatar
    18 posts
    Member since:
    Jun 2017

    Posted 22 Nov in reply to Dess Link to this post

    Dear:
    After many problems with the subject we were surprised that the problem was with the touch screen monitor since testing on a laptop worked as expected, so we updated the driver to the latest version which solved the problem completely.

    We close this topic without thanking you infinitely for your support and above all for your patience.


    Greetings from Lima, Peru
  18. Dess
    Admin
    Dess avatar
    2222 posts

    Posted 22 Nov Link to this post

    Hello, Jhon,    

    Thank you for writing back. 

    I am glad that the problem you were facing is now resolved. If you have any additional questions, feel free to submit a support ticket. Thus, our support staff will gladly assist you.

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top