Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Treeview Datawindow level header

290 views
Skip to first unread message

Bruno Herndler

unread,
Jun 8, 2006, 8:18:38 AM6/8/06
to
Hi,

Does anybody know how to set the header information for each level of a
datawindow in the treeview presentation style. I only can set trailer
information for each level and a header for the whole datawindow.

Regards,

Bruno Herndler

dawntbrowneyes

unread,
Jun 8, 2006, 10:05:52 PM6/8/06
to
In PB 10.5 the treeview datawindow is like the group
datawindow.
So if you want to change the headings you could:
delete the default headings and put computed fields in the
treeview level (header)

Usually if you change the fields (columns) in the headers,
you would be changing the treeview level.
in the following example, the code changes group 1, treeview
level equal to dept_id: dw_1.setitem(1,
'department_dept_id',1111)
note: by changing the level you made it into another branch.
It doesn't make sense to change the columns in the treeview
header.

If you want to put a dummyfield in the header, then change
it... you change the same way as you change the trailer:
instead of finding the last row in the group, find the first
row, then change the dummyfield for that row.

For example in a group or treeview datawindow I put a
dummyfield in the resultset
Select .... space(20) as dummyvalue from ....

now in the datawindow I can scroll thru the datawindow and
change the first
and last row of the group/level:

long ll_cnt, ll_max, ll_group
string ls_first, ls_last
ll_max = dw_1.rowcount()
for ll_cnt = 1 to ll_max
ls_first = dw_1.Describe("evaluate('first( getrow() for
group 1 )',"+string(ll_cnt)+")")
ls_last = dw_1.Describe("evaluate('last( getrow() for group
1 )',"+string(ll_cnt)+")")
//clear out old values
dw_1.setitem(ll_cnt, 'dummyvalue', "")
if ll_cnt = long(ls_first) then
ll_group = ll_group + 1
dw_1.setitem(ll_cnt, 'dummyvalue', 'h:'+string( ll_group))
end if
if ll_cnt = long(ls_last) then
dw_1.setitem(ll_cnt, 'dummyvalue', 't:'+string( ll_group))
end if
next

0 new messages