xbrowse TreeItem

xbrowse TreeItem

Postby fraxzi » Sat Feb 26, 2011 7:56 am

Dear All,


How to delete oTreeItem ( oItem:Delete() ) if oTreeItem:oNext is NIL?


Kind Regards,
Frances
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: xbrowse TreeItem

Postby fraxzi » Wed Mar 09, 2011 3:34 am

Dear Mr. RAO,


Any sample how to remove a tree treeitem from oTree?

If a condition is met.. this treeitem mus be remove. Any help?


Kind Regards,
Frances
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: xbrowse TreeItem

Postby Silvio » Wed Mar 09, 2011 9:43 am

you Know how delete a record from xbrowse ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: xbrowse TreeItem

Postby nageswaragunupudi » Wed Mar 09, 2011 1:35 pm

fraxzi wrote:Dear Mr. RAO,


Any sample how to remove a tree treeitem from oTree?

If a condition is met.. this treeitem mus be remove. Any help?


Kind Regards,
Frances

Actually this is not quite simple.
Version 10.12 handles this properly.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse TreeItem

Postby fraxzi » Wed Mar 09, 2011 11:34 pm

nageswaragunupudi wrote:
fraxzi wrote:Dear Mr. RAO,


Any sample how to remove a tree treeitem from oTree?

If a condition is met.. this treeitem mus be remove. Any help?


Kind Regards,
Frances

Actually this is not quite simple.
Version 10.12 handles this properly.



I see..

I already requested my company for new FHW upgrade 11.1
I guess I need to wait for that.


Kind Regards,
Frances
Last edited by fraxzi on Wed Mar 09, 2011 11:39 pm, edited 1 time in total.
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: xbrowse TreeItem

Postby fraxzi » Wed Mar 09, 2011 11:39 pm

Silvio wrote:you Know how delete a record from xbrowse ?


Dear Silvio,

In my case, I used VK_DELETE key assign it to bKeyChar with code block alias->( dbdelete() ) and refresh the xbrowse.

if you mean the ::oTreeItem:Delete(), doesn't work perfectly with my case.


Kind regards,
Frances
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: xbrowse TreeItem

Postby MdaSolution » Thu Mar 10, 2011 7:39 am

but I think you can delete a record and then refresh the tree
FWH .. BC582.. xharbour
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: xbrowse TreeItem

Postby fraxzi » Thu Mar 10, 2011 9:01 am

MdaSolution wrote:but I think you can delete a record and then refresh the tree



My alternate solution is to exclude a record matching my condition..

Thank you for your suggestion.


Kind Regards,
Frances
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: xbrowse TreeItem

Postby nageswaragunupudi » Thu Mar 17, 2011 2:42 pm

Yes. For the time being, you can delete the record from the original data and then reconstruct the tree and refresh the browse. Seems very crude solution but works quite well and I myself used it under complex situations without hitting the performance.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse TreeItem

Postby Marcelo Via Giglio » Wed Apr 20, 2011 2:14 am

Hello,

in other way are there the option to create a subtree or tree on run-time, per example all the item in the xbrowse are level 0 in the tree then by double click or another method we add a tree for the current row in the xbrowse and open it.

regards

Marcelo
Marcelo Via Giglio
 
Posts: 1064
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: xbrowse TreeItem

Postby nageswaragunupudi » Wed Apr 20, 2011 2:50 am

Yes.
Code: Select all  Expand view
WITH OBJECT oBrw:oTreeItem
   :SetTree( oSubTree )
   :Open()
END
oBrw:Refresh()
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse TreeItem

Postby Marcelo Via Giglio » Wed Apr 20, 2011 11:33 am

Thanks very much Mr. RAO,

I found it and work, another question how can delete the tree without delete the root, in other words delete only the same tree added

regards

Marcelo
Marcelo Via Giglio
 
Posts: 1064
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: xbrowse TreeItem

Postby Marcelo Via Giglio » Wed Apr 20, 2011 12:38 pm

Hello again.

because I have thousands of records, I want to know if it possible to have a normal xBrowse database associated
with the possibility to make a tree in some row by demand, no for all, only for selected row

thanks in advance

Marcelo
Marcelo Via Giglio
 
Posts: 1064
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: xbrowse TreeItem

Postby nageswaragunupudi » Wed Apr 20, 2011 2:22 pm

Marcelo Via Giglio wrote:Thanks very much Mr. RAO,

I found it and work, another question how can delete the tree without delete the root, in other words delete only the same tree added

regards

Marcelo


Code: Select all  Expand view

oItem:oTree := nil
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse TreeItem

Postby nageswaragunupudi » Wed Apr 20, 2011 2:41 pm

Marcelo Via Giglio wrote:Hello again.

because I have thousands of records, I want to know if it possible to have a normal xBrowse database associated
with the possibility to make a tree in some row by demand, no for all, only for selected row

thanks in advance

Marcelo

Please try this:

Create browse of the DBF in the normal way.
Insert this line:
Code: Select all  Expand view
oBrw:SetTree( 1 )

just before activating window or dialog.

Now the browse will be on oBrw:oTree created automatically by XBrowse and each oItem of the oTree having the record number of the dbf.
When the tree is navigated, the dbf goes to the record. The browse will still look like the one you created on the dbf.

Now you add a child tree to any item you want.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 57 guests