Treeview with link 
January 6th, 2009, 07:42 AM
|  | Newbie | | Join Date: Nov 2008
Posts: 26
| | Treeview with link
How to use a treeview when I click the node a form will show to the screen...
please help me...thanks God bless...
| 
January 6th, 2009, 09:27 AM
|  | Moderator | | Join Date: Dec 2006 Location: Bangalore ,India
Posts: 7,310
| |
Are you fetching any data from database and want to display on a form ?
or you want to open a new form each time you click on a new node ?
| 
January 6th, 2009, 01:57 PM
|  | Moderator | | Join Date: Oct 2006 Location: Bangalore
Posts: 1,383
| |
Hi,
In node click event, depending on the node caption , call the form..
Something like this : -
If TrVw.SelectedItem.Text = "Customers" Then
-
frmCustomers.Show
-
Elseif TrVw.SelectedItem.Text = "Orders" Then
-
frmOrders.Show
-
End If
-
REgards
Veena
| 
January 8th, 2009, 01:48 AM
|  | Newbie | | Join Date: Nov 2008
Posts: 26
| | Quote:
Originally Posted by debasisdas Are you fetching any data from database and want to display on a form ?
or you want to open a new form each time you click on a new node ? |
I want to open a new form each time I click on a new node...
| 
January 8th, 2009, 01:54 AM
|  | Newbie | | Join Date: Nov 2008
Posts: 26
| | Quote:
Originally Posted by QVeen72 Hi,
In node click event, depending on the node caption , call the form..
Something like this :
Expand|Select|Wrap|Line Numbers - If TrVw.SelectedItem.Text = "Customers" Then
- frmCustomers.Show
- Elseif TrVw.SelectedItem.Text = "Orders" Then
- frmOrders.Show
- End If
REgards
Veena |
where can I find node event???
Do I have to declare some variable because i got this error on the first line
"object variable or with block variable not set"
Is costumer a name for a node???
| 
January 8th, 2009, 02:20 AM
|  | Moderator | | Join Date: Oct 2006 Location: Bangalore
Posts: 1,383
| |
Hi,
On your Form, Double Click the TreeView, and from event's list, Select the NodeClick event..
From my code, change the name of Control Treeview , Give your control name accordingly..
Regards
Veena
| 
January 8th, 2009, 11:26 AM
|  | Newbie | | Join Date: Nov 2008
Posts: 26
| | Quote:
Originally Posted by QVeen72 Hi,
On your Form, Double Click the TreeView, and from event's list, Select the NodeClick event..
From my code, change the name of Control Treeview , Give your control name accordingly..
Regards
Veena |
Thanks you so much... it works...
How to put image on the treeview??/
how to initialize
God bless
| 
January 9th, 2009, 04:59 AM
|  | Moderator | | Join Date: Oct 2006 Location: Bangalore
Posts: 1,383
| |
Hi,
Add an ImageList Control to your Form.
Add All the Images,
Select Treeview's Property : ImageList = ImageList1
Now when you add nodes, To Set 4th Image in Image List :
Give this syntax:
TrVw.Nodes.Add , , "MynewNode", "New Node", 4
Change Images's Index Accordingly..
Regards
Veena
| 
January 10th, 2009, 01:43 PM
|  | Newbie | | Join Date: Nov 2008
Posts: 26
| | Quote:
Originally Posted by QVeen72 Hi,
Add an ImageList Control to your Form.
Add All the Images,
Select Treeview's Property : ImageList = ImageList1
Now when you add nodes, To Set 4th Image in Image List :
Give this syntax:
TrVw.Nodes.Add , , "MynewNode", "New Node", 4
Change Images's Index Accordingly..
Regards
Veena |
Thanks God bless....
| 
January 11th, 2009, 01:55 PM
|  | Newbie | | Join Date: Nov 2008
Posts: 26
| | Quote:
Originally Posted by debasisdas Are you fetching any data from database and want to display on a form ?
or you want to open a new form each time you click on a new node ? |
what if I am fetching data freom the databse??/ can you help me with that???
|  | | Thread Tools | Search this Thread | | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 220,840 network members.
|