This is a migrated thread and some comments may be shown as answers.

mouse hover

3 Answers 927 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Moe
Top achievements
Rank 1
Iron
Iron
Veteran
Moe asked on 10 Sep 2019, 03:27 AM

Hi Admin,

 

MouseHover - I want to open the one of form and  once the mouse is moved away the form closes

Please tell to me how to do like that?

 

Thanks,

Moe

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 10 Sep 2019, 01:08 PM
Hello, Moe,

If I understand your requirement correctly, you want to close the form once the user moves the mouse outside the form's bounds. For this purpose, you can refer to the following Stack Overflow thread which is quite useful on this topic: https://stackoverflow.com/questions/15974258/close-application-when-mouse-leaves-form

However, if it is not the exact requirement, please give us some more details about the exact requirement that you are trying to achieve. Thus, we would be able to think about a suitable solution and assist you further. Thank you in advance.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Moe
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 11 Sep 2019, 04:49 AM

Hi Dess,

 

I have one radgridview. When I do mouse hover of the row , I want to open other form(FrmProcess). After mouse move out , I want to close the form(FrmProcess). I saw alot of mouseover event function other topic . But this event is not useful for me. I want mousehover event function.

 

Thanks

Moe

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 11 Sep 2019, 02:08 PM

Hello, Moe,

In order to achieve your goal, you can handle the MouseMove event that RadGridView offers and detect what is the visual cell element under the mouse. Store the last hovered row and if it changes indicate the another row is hovered. You can find below a sample code snippet. Note that this is just a sample approach and it may not cover all possible cases. Feel free to modify it in a way which suits your requirements best:

        GridViewRowInfo lastHoveredRow = null;

        private void radGridView1_MouseMove(object sender, MouseEventArgs e)
        {
            GridCellElement cellElement = this.radGridView1.ElementTree.GetElementAtPoint(e.Location) as GridCellElement;
            if (cellElement != null)
            {
                if (lastHoveredRow != null)
                {
                    if (lastHoveredRow != cellElement.RowInfo)
                    {
                        Console.WriteLine("Out >> " + lastHoveredRow.Index);

                        Console.WriteLine("In >> " + cellElement.RowInfo.Index);

                    }
                } 
                lastHoveredRow = cellElement.RowInfo; 
            }
        }

I hope this information helps.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Moe
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Moe
Top achievements
Rank 1
Iron
Iron
Veteran
Share this question
or