The issue at had is pinned columns - these stay unmoving on left side of the grid regardless of how you scroll, which means that if you stretch the right edge of a pinned column off the right side of the grid and let go, the edge is out of reach and you can't scroll over to get it, which effectively makes all columns to the right of it permanently unavailable. This is obviously undesireable and I wish to avoid it.
The columns must remain pinned and resizeable - up to but not including the ability to drag the edge of the column off the edge of the grid. Note that the allowable width is not fixed; it depends on both the width of the grid and the current position of the column within it. The column might be the second or third columnin the grid, with the (also pinned) columns to its left being arbitrarily resizeable as well.
My plan in dealing with this would be to react to the ColumnWidthChanging or ColumnWidthChanged events and constrain/restore the column to a decent width, but I ran into an unexpected problem - I can't figure out how to get the location on-screen of a given column! Without knowing where the column's left edge is I can't determine how wide to allow it to be. Given a GridDataCellElement I could ask for its ControlBoundingRectangle, but I don't know how to get a GridDataCellElement from an arbitrary column. The only one I seem to have direct access to is CurrentCell, which may or may not be in the column I'm interested in.
So - can anyone tell me how to get an arbitrary GridDataCellElement, or otherwise determine the pixel location of a column's left edge?
The columns must remain pinned and resizeable - up to but not including the ability to drag the edge of the column off the edge of the grid. Note that the allowable width is not fixed; it depends on both the width of the grid and the current position of the column within it. The column might be the second or third columnin the grid, with the (also pinned) columns to its left being arbitrarily resizeable as well.
My plan in dealing with this would be to react to the ColumnWidthChanging or ColumnWidthChanged events and constrain/restore the column to a decent width, but I ran into an unexpected problem - I can't figure out how to get the location on-screen of a given column! Without knowing where the column's left edge is I can't determine how wide to allow it to be. Given a GridDataCellElement I could ask for its ControlBoundingRectangle, but I don't know how to get a GridDataCellElement from an arbitrary column. The only one I seem to have direct access to is CurrentCell, which may or may not be in the column I'm interested in.
So - can anyone tell me how to get an arbitrary GridDataCellElement, or otherwise determine the pixel location of a column's left edge?