Many times you want to select multiple columns in a DataGrid and highlight the columns selected.
In the DataGrid MouseDown Event you will find out if you have selected a column header through the hit test. You then find the co-ordinate of the column and construct a rectangle out of that. If you are selecting multiple columns you can store the index of the columns and the rectangle in ArrayList.
Make sure you clear the ArrayList when you HitType is None.
View Complete Post