I have a grouped datawindow that I want to determine the first row in group
(or get a value from the header of the group) when the user double clicks
on the group header band.
I have spent time looking in Help files, online books and searching the news
group, but nothing specified actually works.
I've tried accessing values from DWO,
GetBandAtPointer (returns "background~t0" even though documentation says it
should return the group n and first row in group)
GetObjectAtPointer (returns empty string )
__get_attribute
GetRow()
I know I can reference the value in a computed column for a group header if
I know the row number of a row in the group. The problem is I can't find a
way to get a row number of any of the rows within the group that the user
double clicked.
I've got to believe someone else has done this in the past, but I can't seem
to get anything to work.
Anyone have any Idea how to make this work?
Thanks,
Russ
Ken
"Russ Colburn" <No_Russellc_SpamatAccidentFunddotcom> wrote in message
news:4456245c$1@forums-2-dub...
Anyone have any other ideas to try for a workaround?
Thanks,
Russ
"Ken Balakrishnan" <kNOe...@cps92.com> wrote in message
news:44563871$1@forums-2-dub...
"Russ Colburn" <No_Russellc_SpamatAccidentFunddotcom> wrote in message
news:445651e8$1@forums-1-dub...
Russ
"Ken Balakrishnan" <kNOe...@cps92.com> wrote in message
news:4456594d$1@forums-1-dub...
Ken
"Russ Colburn" <No_Russellc_SpamatAccidentFunddotcom> wrote in message
news:44566334$1@forums-1-dub...
It turns out that there were two problems I was seeing.
1) The debugger apparently has a problem as I would always get
"background~t0" from the GetBandAtPointer function while in the debugger.
Another developer would sometime get the correct values in the debugger as
long as he used the "step in" vs. "step over" buttons in the debugger, but I
never got the correct value in the debugger. Using a message box to debug I
was getting the correct values most of the time.
2) The second problem was if you used the mouse to grab the scroll bar
control and dragged it to a new page something would get out of sync and I
would again get the background 0 response. Once you clicked on the scroll
bar arrows, or the empty space between the control handle and arrows it
start working again.
My workaround was to put code in the clicked event (as my code was in
doubleclicked) to save the first row on the page, scroll to row 0 then
scroll back to the first row on page. Then I would get the header.4
rownumber as expected in the doubleclicked event.
I hope this can help some others out there.
Thanks for you help on this Ken.
Russ
"Ken Balakrishnan" <kNOe...@cps92.com> wrote in message
news:44566fbb$1@forums-1-dub...
IF dwo.name = GROUP_TITLE THEN
ls_obj = GetObjectAtPointer()
IF Len(ls_obj) > 0 THEN
ll_row = Long(Mid(ls_obj,
Len(GROUP_TITLE)+1))
If ll_row > 0 THEN
Russ
<Philip Salgannik> wrote in message
news:445f654f.667...@sybase.com...