Get the index of the line pointed by mouse

2 posts, 0 answers
  1. Brice
    Brice avatar
    1 posts
    Member since:
    Feb 2015

    Posted 25 Aug Link to this post


    i try to get the index of the line I point with the mouse when the list of the multicomulmncombobox is opened and the line is not selected yet.

    How can I do that?


  2. Dimitar
    Dimitar avatar
    1324 posts

    Posted 25 Aug Link to this post

    Hello Brice,

    Thank you for writing.

    If I understand correctly you want to get the hovered row index. This can be achieved by using the MouseMove event of the underlying grid: 
    // Subscribe to the event like this
    radMultiColumnComboBox1.EditorControl.MouseMove += EditorControl_MouseMove;
    //Get the hovered element
    private void EditorControl_MouseMove(object sender, MouseEventArgs e)
        var element = radMultiColumnComboBox1.EditorControl.ElementTree.GetElementAtPoint(e.Location);
        if (element is GridDataCellElement)
            var cell = element as GridDataCellElement;

    I hope this will be useful. 

    Telerik by Progress
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
  3. DevCraft R3 2016 release webinar banner
Back to Top