Hi,
I allow users to rearrange the columns in the grid, but need to format the rest of the screen around the current position of one of the columns, is there any way to find out exactly how many pixels the column is from the left edge of the Grid?
I can get the width of a column in the grid and it's OriginX & SpanX values from RowLayoutColumnInfo, but I can't find the Origin in terms of pixels.
Thanks
Andy
Thanks, that's gives me all the column location information I need.
Regards
As long as the column is actually visible within the viewable area of the grid, you can get the location using UIElements. UIElement element = this.ultraGrid1.DisplayLayout.Bands[0].Columns["String 1"].Header.GetUIElement(); if (element != null) Debug.WriteLine(element.Rect);
If you are not showing column headers, you might want to use a cell instead. In which case you just get any cell in the column and call GetUIElement on it, instead of the column header like I am doing here.