|
I used this control on a database, and I want to be able to do a copy of the body of the nodes and subitems, next put back them in entirety in having to change only the value of a column (fields ref DB)
|
|
|
|
|
|
As I use this superb component with a database, I have of the to modify this component at the level of the classes, For the under nodes (Listview) not need of icon and it lacked me 3 property ,(
Key,Value,WithImage, (of a column))
Claude
|
|
|
|
|
Claude,
Sorry, but i'm still not sure what you are getting at here.
|
|
|
|
|
The control looks pretty good man. I'm glad people are still working on these controls, as I have had such a hard time finding time to do any personal projects. I would love to dive back in and rewrite my original controls, but I don't think it will ever happen. Keep up the good work, and keep the project alive.
|
|
|
|
|
Your article was my inspiration to get it started and extend it. I looked at several other attempts at TreeListView controls but all of them were either underdeveloped or very buggy. So I took your design as the base and decided to merge all of the good aspects of the other controls (as well as my own ideas) into one control! I tried to keep it as extensible as possible so others could build on top of it easily if necessary. I've actually had this control since 2004 (working on it here and there) but, unfortunately, my aversion to writing articles and my lack of any free time (2 kids, full time job as well as maintaining a small side business) for personal projects actually kept me from posting it on CodeProject but I finally mustered up enough motivation to post it here.
Thanks for your original article. If it wasn't for that I probably never would have started it.
|
|
|
|
|
But you may want to look at the performance.
When you add say 500, 1,000 or even 5,000 nodes the control works well, but when you add 10,000 the control becomes sluggish and slow to respond.
Other than that, very well done!
I think this control will be very useful and has great potential.
Kind regards
Gary
|
|
|
|
|
Thanks! I'll check it out and hopefully get it fixed.
|
|
|
|
|
Performance of this control is a tricky thing to work out. I messed with quite a few versions of rendering code after I posted my final version of the extended listview control years ago, and never fully solved all of the performance problems. I am convinced that there is a nice, simple, and elegant solution, however. Since my first attempt at writing a control like this, I've learned quite a bit about fundamental algorithms and structures. Trees follow strict rules and have certain attributes, like depth, that should provide the simple answer that will allow a control like this to function with an unlimited number of records (rendering only the visible nodes, ignoring all the rest).
I may be able to dig up all my old versions and notes of the extended listview control and provide them....maybe it will help.
|
|
|
|
|
That would be great, Jon. Thanks!
|
|
|
|
|
It works nicely and is full featured.
I think checking a node should check all the subnodes of the checked node.
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
Tadah! That's what 'Branching' is for! You can capture the AfterCheckStateChanged event on the TreeListView and control the child nodes using the 'Branch' property like this:
Private Sub tlvMain_AfterCheckStateChanged(ByVal sender As Object, ByVal e As WinControls.ListView.EventArgClasses.ContainerListViewEventArgs) Handles tlvMain.AfterCheckStateChanged
DirectCast(e.Item, TreeListNode).Branch.SetProperty("Checked", e.Item.Checked)
End Sub
You pass in the property name you want to set/unset and it will set that same property on all the children.
|
|
|
|
|
Tosberg wrote: You can capture the AfterCheckStateChanged
event on the TreeListView and control the child nodes using the 'Branch' property like this
Right, I did exactly that in my own code for a different project, and thought it should be nice to have.
BTW, any plan to support various column types in the listview (say combobox, checkbox etc)?
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
Hmmmm... I hadn't thought of that. I'll put that down on the list for future development.
|
|
|
|
|
A screenshot would have been nice...
Apart from that, it looks like a very nice control, so I'll give you a 5 nonetheless.
I do have a problem, though: I've only run your demo to see what it looks like, and in that demo it doesn't appear that the checkboxes/Radiobuttons work. Isn't it enough just to set Checkboxes=true?
Cheers,
Johnny J.
modified on Wednesday, June 11, 2008 6:40 AM
|
|
|
|
|
I'll work on getting a screenshot out later today after work. Sorry about that. I was in a rush to get the control out to CodeProject.
Once you set the 'CheckBoxes' property to TRUE, you should see the checkboxes appear on the control as it should refresh instantly. The 'CheckBoxType' property sets it to Checkboxes or RadioButtons. I haven't run into this issue before and I've run this on both XP and Vista. What operating system are you running this on?
modified on Wednesday, June 11, 2008 7:38 AM
|
|
|
|
|
Nice control, I'll look into it further today. As for the Checkboxes, it works with the space bar once you selected the proper line, not with the mouse click..
It works when you change "CheckBoxSelection" property to "OneCLick"...
|
|
|
|
|
That is by design. By default, you need two mouse-clicks to check/uncheck a node but you only need to press the space bar once. You can change this behavior (mouse-clicks) like you mentioned above by setting it to 'One Click'.
Maybe I should have changed the description to make it more intuitive in the intellisense.
|
|
|
|