|
From the reference you have given that is actually creating a custom tree view control from what i understood. But what I need is:
I cannot create a tree data structure because I have to read the xml first and store in some collection.
I have a user control where I have: a picture box control and tree view control below that. When the picture box is clicked I want to show the treeview with nodes and sub nodes if any looping through the collection. Any examples of this kind please.
Thanks for your help in advance !
LK
|
|
|
|
|
I don't know if I understood this properly, but as you want to loop through your XMLDocument and placing the items into a TreeView, you can try the following. MainTree is the TreeNode and doc is the XMLdocument.
Dim doc As New XmlDocument<br />
doc.Load(PathName)<br />
MainTree.Nodes.Clear()<br />
For Each mainroot As XmlNode In doc.ChildNodes<br />
Dim maintreenode As New TreeNode<br />
maintreenode.Text = mainroot.Name<br />
MainTree.Nodes.Add(maintreenode)<br />
For Each subnode As XmlNode In mainroot.ChildNodes<br />
Dim subroot As New TreeNode<br />
subroot.Text = subnode.Name<br />
maintreenode.Nodes.Add(subroot)<br />
<br />
etc..<br />
<br />
Next<br />
Next<br />
Hope this helps you out,
--Zaegra--
Motivation is the key to software development.
|
|
|
|
|
Member 2260473 wrote: From the reference you have given that is actually creating a custom tree view control from what i understood.
Ähm, no. Its a Tree-Datastructure, no Control. And I build a Tree from it, which each leafs type String.
Why cant u create a similar tree datastructure ("Value" can be any type, so I suppose, also the datatype u need), and fill it by reading the xml?
And from that tree build ur UserControl-Treeview, and do the other things, u want to do.
|
|
|
|
|
This is a silly question, but is there a way to get datagridview columns names in intelli-sense as properties?
For example:
grdUsers.Rows(vlngUserRow).Cells("SoftwareSystemSecurityID").Value
Is it possible to do something like (property vs. having to type the column name)?
grdUsers.Rows(vlngUserRow).Cells.SoftwareSystemSecurityID.Value
Thanks for any help/suggestions!
|
|
|
|
|
If you added the column at design time, you could reference it like this:
grdUsers.Rows(vlngUserRow).Cells(SoftwareSystemSecurityID.Index).Value
But if you get the column because you had set the grid's datasource to a dataset/datatable that contains the column, this doesn't work.
Hope this helps.
|
|
|
|
|
Score!
Don't know how I missed that. Thanks!
|
|
|
|
|
There are 2 list box and a horizontal Splitter. When I resize the window, both the listbox does not resize proportionally. The top listbox remains in same height, the bottom listbox gets resized.
The properties for splitter is
cursor - HSplit
Dock - Top
The properties for listbox1 is
Dock - Top
Anchor - Top,Left
The properties for listbox2 is
Dock - Fill
Anchor - Top,Left
Changing the dock or Anchor do not work out..
|
|
|
|
|
Hi,
Since the Dock property is set to Top, the width will resize in proportion to the window size.
Therefore, in order to get the desired resolution try setting the Dock property of first ListBox to Fill. This will ensure that the ListBox resizes proportionally to the window.
Hope this helps .
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
I tried that option too.
If both the listbox is set to Fill, then i can able to view only one list box.
This option is not working
|
|
|
|
|
In how many forums did you ask that question?
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
hi all,
i want to create Backup file (.bak file of Sql Server) programmatically .How can Achieve this task in vb.net.Also how can i restore the data programmatically in database? I use SqlExpress which is supplied with Visual Studio.
|
|
|
|
|
You can write practically any SQL into the SqlCommand object. All you need to do is write the SQL to perform the back up and perform ExecuteNonQuery() on the SqlCommand object.
|
|
|
|
|
sir,
can you explore this thing in detail or provide some useful link for this task ?
|
|
|
|
|
Hi, I am now working on a data compare and copy for datagrid. Below i have the codes the open up this csv file and attached it to the datagrid1.
I am now finding a way to
1. Type in "123123" into the textbox
2. Click a button
3. Compare it with the datagrid1(which has the opened csv file) or compare directly with csv file
4. Copy the whole row on which the "123123" is found and paste into another field or datagrid for display
Public Function Import()<br />
<br />
Dim myPath As String = "c:\testing.csv"<br />
<br />
Try<br />
<br />
Dim objDataSet As System.Data.DataSet<br />
Dim objAdapter As System.Data.OleDb.OleDbDataAdapter<br />
<br />
strConnection = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source='" & myPath & " '; " & "Extended Properties=Excel 8.0;")<br />
objAdapter = New System.Data.OleDb.OleDbDataAdapter("select * from [sheet1$]", strConnection)<br />
objDataSet = New System.Data.DataSet<br />
objAdapter.Fill(objDataSet)<br />
DataGrid1.DataSource = objDataSet.Tables(0).DefaultView<br />
strConnection.Close()<br />
<br />
Catch ex As Exception<br />
<br />
Dim er As String<br />
<br />
strConnection.Close()<br />
<br />
End Try
thanks
|
|
|
|
|
Use the objDataSet.Tables(0).Select("ColumnName = "& YourTextBox.Text")
This will return DataRow Collection that you can manage the way you wish
Best Regards
3ala2
|
|
|
|
|
hy everyone!
i do have problems debugging my webservice. it compiles propperly but when i choose "debug > start new instance" in the solution explorer then i get the message "Auto-attach to process '[2704] aspnet_wp.exe' on machine 'devVS2003' failed. Error code 0x8013134b".
When I manually attach the process to aspnet_wp.exe and start it in debug mode (common language runtime checked) i get a dialog "unable to attach to the process" but no message why.
does anyone of you have an idea how to solve this?
when i googled for it i just found similar postings but no solution to these problems which could help me.
thanks for any advice.
stephan.
|
|
|
|
|
Hi Friends
I am developing small project using Biometric device. its process is create the user(capture finger print) and when the user login it verify the user.
i dont have any idea about. if any body knows kindly help me.
i am using the device NITGEN (FINGKEY HAMSTER).
Thanking You
Regards
K. Rajesh Kumar
i am a fresher in software development i have so many doubts in .net so i need to ca
|
|
|
|
|
There's an API[^] for it.
|
|
|
|
|
Is there s way by using vb.net to know the current memory of my portable harddisk?? Where should i point to as there is no URL for harddisk...
|
|
|
|
|
|
Hi all,
I m working with Proxy Server Project.but i have got many error Like Listning Clients URL.
Please help
Thanks
|
|
|
|
|
Member 4542257 wrote: i have got many error
Well, that sure doesn't help anyone help you.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi all,
I want to write a service, which takes 2 arguments.
How can i do in VB6?
Thanx
Webbee™ the Œ
|
|
|
|
|
This[^] is the best place to look for what you need to do.
|
|
|
|
|
im suppose to write a 4 page document on "How does Open source cater for what Microsoft’s ADO.Net provide"
then i have to come up with example aswell.
any help will be appeciated
|
|
|
|