Question

I have several datawindows with different looks. One simple just has a detail band and shows information. I can select rows in that datawindow, which marks that row. I got another DW that has a groupband with all the columns in it, and for some reason I can't select rows in that one.

I've also noticed that for example in itemfocuschanged(...) the dwobject argument is null for the DW with the group band. How do I solve this so also can select rows in my other DW?

Was it helpful?

Solution

All of the really nice easy to use functions depend on you using the detail band.

Otherwise, you'll need to parse the return value of GetBandAtPointer Function. This will allow you to get the first detail row which informs your group row.

Here is an example from some of my code:

// Get Info from Header
band = dw_unbillables.GetBandAtPointer()

// Get the first row referred to by the header
li_cur_row = Integer(Mid(band,Pos(band, "~t")+1))

From Help: Return value

Returns a string that names the band in which the pointer is located, followed by a tab character and the number of the row associated with the band (see the table in Usage). Returns the empty string (" ") if an error occurs. If dwcontrol is null, the method returns null.

Search the help for GetBandAtPointer for full details.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top