Home Forums WinForms controls Xceed Grid for WinForms Right Click on the Grid

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17773 |

    I have a grouped grid, which has normal (data) rows and summary (stat) row. When I right-click on the normal row, I pop up a context menu. right now, when I click on the summary row, the context menu is pop up too.

     

    How can I find that the row is a summary row? so I can block my context menu. 

    Imported from legacy forums. Posted by Ming (had 68 views)

    Fawzi [Xceed]
    Member
    Post count: 722

    Hi Ming,

     

    Are you using Xceed Grid for .net or Xceed DataGrid for WPF?

    Imported from legacy forums. Posted by Fawzi [Xceed] (had 23 views)

    User (Old forums)
    Member
    Post count: 23064

    WPF

    Imported from legacy forums. Posted by Ming (had 22 views)

    Fawzi [Xceed]
    Member
    Post count: 722
    Hi Ming,
    A summary row should be of type StatRow. To achieve what you are looking for you could catch the “PreviewMouseRightButtonDown” event on StatRow and set it to be handled. A simple way to do so could be through a style which targets StatRow, for example:
                <Style TargetType=”{x:Type xcdg:StatRow}”>
                    <EventSetter Event=”PreviewMouseRightButtonDown” Handler=”grid_PreviewMouseRightButtonDown” />
                </Style>

    Imported from legacy forums. Posted by Fawzi [Xceed] (had 26 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.