Is you app a desktop or a device app?
If it is a device app, why try to pop-up a calendar? use a panael and meke it visible when you need it...
The same aplies to the desktop, but in that case I can understand why you need to calculate the position, but is there any harm to always show the calendar control in the same position?...
Still calculating the vertical position is fairly easy...
imagine that your table is 50 lines high, and you only show 10..
the minimum of the srollbar is 1 and the max is 50, but the step, if set to 5, gives you a way to know wich of the 10 visible lines were cliked...
so on table select you can check wich line was selected, and (assuming they all have the same height) divide the used screen by the table, by the number of lines shown, minus the multiple of the height of the line index, minus the scrollbar step....pfuuuiuu.....
it's better thought than put in words, but if you can visualize what i'm saying, it gets clearer...