This is a migrated thread and some comments may be shown as answers.
Radlistview itemmouseclick fail
17 Answers 24 Views
This is a migrated thread and some comments may be shown as answers.
Jhon
Top achievements
Rank 1
Jhon asked on 26 Oct 2017, 02:11 PM

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

17 Answers, 1 is accepted

Sort by
0
Jhon
Top achievements
Rank 1
answered on 28 Oct 2017, 03:46 PM
PLEASE SUPPORT.
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 30 Oct 2017, 12:05 PM
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.
0
Jhon
Top achievements
Rank 1
answered on 30 Oct 2017, 01:25 PM

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
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 31 Oct 2017, 08:51 AM
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.
0
Jhon
Top achievements
Rank 1
answered on 31 Oct 2017, 03:32 PM

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

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 01 Nov 2017, 08:45 AM
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.
0
Jhon
Top achievements
Rank 1
answered on 02 Nov 2017, 03:30 PM
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
0
Jhon
Top achievements
Rank 1
answered on 03 Nov 2017, 01:35 PM
Dear, I forgot to mention that I use Visual Studio 2012 and Framework 4.0.

regards
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 06 Nov 2017, 11:56 AM
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.
0
Jhon
Top achievements
Rank 1
answered on 07 Nov 2017, 01:11 PM

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.

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 08 Nov 2017, 09:10 AM
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.
0
Jhon
Top achievements
Rank 1
answered on 19 Nov 2017, 01:11 AM
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
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 21 Nov 2017, 11:11 AM
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.
0
Jhon
Top achievements
Rank 1
answered on 22 Nov 2017, 12:57 AM

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

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 22 Nov 2017, 11:53 AM
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.
0
Jhon
Top achievements
Rank 1
answered on 22 Nov 2017, 01:16 PM
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
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 22 Nov 2017, 01:40 PM
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.
Asked by
Jhon
Top achievements
Rank 1
Answers by
Jhon
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or