Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
515
Row Selector Click / Own Column
posted

Hi Guys

I am having some troubles isolating the click event of the row selectors, mainly because I use RowSelectorNumberStyle.RowIndex, and the row index is a text element...

I have used a DrawFilter to remove the selector arrows.

I have already trapped the column header click with no problems using the following code on mouse down:

Dim ThisUIElement As UIElement
Dim ThisHeader As ColumnHeader

ThisUIElement = Grid.DisplayLayout.UIElement.ElementFromPoint(New Point(e.X, e.Y))
If Not ThisUIElement Is Nothing Then
    ThisHeader = ThisUIElement.GetContext(GetType(ColumnHeader))
    If Not ThisHeader Is Nothing Then
        *Code*
    End If
End If

This seems to pay no attention to whether I click the column header caption or not... Unfortunately, with the row selectors, clicking on the row index numbers makes the current UIElement a TextElement rather than RowSelectorUIElement

How can I isolate a click event on a row selector whether it is on the row index or not?

---------------------------------------------------------------------------- 
Also, is there any way to have the row selectors occupy their own column space, rather than overlap the first column in the grid?

 

Thanks in advance!