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

how to detect a mouse click on a radPageViewStripItem

3 Answers 181 Views
PageView
This is a migrated thread and some comments may be shown as answers.
Gone2TheDogs
Top achievements
Rank 1
Iron
Veteran
Gone2TheDogs asked on 11 Apr 2017, 10:18 AM

I don't see an event for when a mouse-click occurs on a radPageViewStripItem. I need to know when a user clicks on this element regardless if the pageview has been changed. (see screenshot)

 

 

3 Answers, 1 is accepted

Sort by
0
Gone2TheDogs
Top achievements
Rank 1
Iron
Veteran
answered on 11 Apr 2017, 11:24 AM

I found that I can use the Mouse_Click event on the PageView.

 

 

0
Hristo
Telerik team
answered on 11 Apr 2017, 01:18 PM
Hi Bob,

Thank you for writing.

The MouseClick event is a valid solution. You can also achieve the desired behavior by handling the MouseDown event and casting the RadElement to RadPageViewStripItem
private void radPageView1_MouseDown(object sender, MouseEventArgs e)
{
    RadPageView pageView = (RadPageView)sender;
    RadPageViewStripItem tab = pageView.ElementTree.GetElementAtPoint(e.Location) as RadPageViewStripItem;
    if (tab != null)
    {
        //...
    }
}

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Gone2TheDogs
Top achievements
Rank 1
Iron
Veteran
answered on 11 Apr 2017, 05:00 PM
Thank you, Hristo. I like your solution much better!!! 
Tags
PageView
Asked by
Gone2TheDogs
Top achievements
Rank 1
Iron
Veteran
Answers by
Gone2TheDogs
Top achievements
Rank 1
Iron
Veteran
Hristo
Telerik team
Share this question
or