In a grid datawindow, i want to get the Y position just after a given row (to display a detail object just below the row).
I did this function :
public function integer of_y_from_row (long al_row); // Get Y from row <al_row> Integer li_Header, li_RowHeight // Header height li_Header = Integer(This.idw.Object.Datawindow.Header.Height) // Detail height li_RowHeight = Integer(This.idw.Object.Datawindow.Detail.Height) // Ignore hidden rows (scroll) al_Row -= (Long(This.idw.Object.DataWindow.FirstRowOnPage) - 1) // Sum header height, visible rows height and one pixel RETURN PixelsToUnits(UnitsToPixels(li_Header + (al_Row * li_RowHeight), YUnitsToPixels!) + 1, YPixelsToUnits!) end function
It works very well, except if there are groups with headers.
Someone have an idea on how to count the number of group headers that are visible before a given row ?
Or any easier way to compute this Y coordinate.
Thanks