how to detect a mouse click on a radPageViewStripItem

4 posts, 0 answers
  1. Gone2TheDogs
    Gone2TheDogs avatar
    32 posts
    Member since:
    May 2016

    Posted 11 Apr Link to this post

    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)

     

     

  2. Gone2TheDogs
    Gone2TheDogs avatar
    32 posts
    Member since:
    May 2016

    Posted 11 Apr Link to this post

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

     

     

  3. Hristo
    Admin
    Hristo avatar
    1018 posts

    Posted 11 Apr Link to this post

    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.
  4. Gone2TheDogs
    Gone2TheDogs avatar
    32 posts
    Member since:
    May 2016

    Posted 11 Apr in reply to Hristo Link to this post

    Thank you, Hristo. I like your solution much better!!! 
Back to Top