|
| Freeview Table -Node or Leaf |
| Iniciado por guest, 14,sep. 2015 12:10 - 2 respuestas |
| |
| | | |
|
| |
| Publicado el 14,septiembre 2015 - 12:10 |
Hi I have a Treeview TABLE using tables "A" and "B"
Table A is the node and B is the leaf. Every record of A has at least one record of B
If tree is collapsed and user clicks on node, I need to expand the node and move the record selector to the first leaf.
Step 1 - Determine what node was clicked? ( Table A) ??? Step 2 - Expand node tableExpand(tvt_eventz) // works fine Step 3 - move row selector to next line in tree which is the leaf. (Table B )
I've tried using some of the trivet commands, but some seem not to be valid for the Table version.
Any comments appreciated |
| |
| |
| | | |
|
| | |
| |
| Publicado el 14,septiembre 2015 - 12:44 |
Hi Mark,
1. You are in a table, therefore tableselect will give you the line clicked. After that, I suppose that you have some kind of unique ID in a column (hidden?) somewhere
2. tableselectplus? of the line number you got in (1)+1
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,septiembre 2015 - 01:15 |
Thanks for the help.... nearly there.. still missing something Code runs ok, but tableSelectPlus returns and stays on the same line.
Selecting the leaf works perfectly Both parent and child are highlighted in the table
Here's my code
// Local Procedure to refresh eventz gnEveid = fixeventz.eveid nRec is int nRec2 is int //sNode is string = treeselect(tvt_eventz) error
// if node ( event) IF TVT_Eventz.COL_hedid = "" THEN TableExpand(TVT_Eventz) nRec = TableSelect(TVT_Eventz) nRec2 = TableGiveChild(TVT_Eventz,nRec,taFirst) // tableposition(TVT_Eventz,nRec2) // returns TableSelectPlus(TVT_Eventz,nRec+1) // returns TableSelectPlus(TVT_Eventz,nRec2) // returns //and tableSelect issued after this returns nRec value and not nRec2
END
nRec2 = TableSelect(TVT_Eventz)
// New seleted row has hedid (fixheader) IF TVT_Eventz.COL_hedid > 0 THEN // its a leaf gnHedid = TVT_Eventz.COL_hedid IWW_Invoice.lp_Setup("Event",gnEveid,gnHedid) ELSE // info("Select an invoice") END |
| |
| |
| | | |
|
| | | | |
| | |
|