views:

25

answers:

1

I am trying to access the header that is at the intersection of the rows and columns headers in a Net3.5 WPF DataGrid.

Josh Smith calls this the "Empty Header" in an article on a different grid control and I would call it the "RowColumn" header since it in the first position for both the column and row headers and is the only header that is part of both. It defaults to a button with a lower right hand arrow that when you press selects all the items in the DataGrid. I can see this button in snoop but cannot work out how to access this header.

I need to stop the button selecting all the items in the grid and add either a menu in its place or a context menu that is keeping the button but adding text to it.

Since I am unclear as to what this is even called in the documentation I have no idea what to search on. I have tried the, to me, obvious ones.

+1  A: 

It took me awhile to find this, decided I wanted to take on the challenge myself since I didn't know the answer straight away. There is not a built in control for that button in the top left, which makes it a little more complicated. The good news is, you can override the "SelectAllButtonTemplate" on load.

I'm not sure what you want to replace it with, but here is a tutorial on how to do it. Also you might find this past question helpful. Good luck sir.

jsmith
Great! Now I know what it is, it called the "Select All" button and some guidance to playing with it. Thanks for rising to the challenge.
Martino