 |
|
|
First, thanks for the control, it is gerat! But has a little bug... The "Root" node's child items has doubled their child items. Because in the ADPicker_Load theres a line: treeView1.Nodes[0].Expand(); ,and after that theres a foreach(...), that is populating the child items with their child items (so we can expand them). BUT the treeView1.Nodes[0].Expand(); triggers the treeView1_AfterExpand function, and that has a foreach() that can populate the list... so the foreach is unnecessary here.
The solution: Just delete (or comment out) this two lines from ADPicker_Load(...) function:
foreach (TreeNode childNode in parentNode.Nodes) AddTreeNodes(childNode);
ps.: Sorry for my bad English 
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Just wanted to take the time to thank you as this control makes my life so much easier. I recently added this control to one of my project and was wondering if there is an easy way to reset the control. For example, a Reset button on my form would restore Adpicker back its original state: Nothing selected, ADsPath set to "". Any suggestion welcome. Thanks again.
Lucas
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Thanks for the feedback - glad you found it useful. You can probably just call CollapseAll() on the TreeView control, then manually set ADsPath to String.Empty. Also, set SelectedNode=null. Let me know if that does what you were hoping for.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Thank you very much for your reply. I must be missing something here because once I add the ADPicker control to my vb.net project, I only have access to the read-only ADsPath property. Is there a way for me to access the underlying Treeview control? I think I would have to modify your code to somehow expose a method that would do what you are suggesting. Let me know if I am way off.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Just wanted to say Thank you, I've been looking for something like this for a couple of weeks. Awesome Control.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
Hi I want to know if somebody implemets the order of the users, before the tree load(ADPicker_Load) Thaks!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Hi,
How can i get the selected object? Example, i selected an ou=Users, how can i get this? I need this selection to become avaliable to create users in a certain OU. Is this possible with your control or i can change the source to be possible?
thanks in advance, Ricardo
Ricardo
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
The ADsPath property is changed each time you select a node. This gives you the fully-qualified path to the object.
|
| Sign In·View Thread·PermaLink | 2.33/5 (2 votes) |
|
|
|
 |
|
|
I like to know how I can use it in my program !?!
how I can give it the domain and the admin username and password
and get the selected OU so I can create users in?
I'm new to this and I like to learn it
Thank
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Marc, thanks for sharing. Works beautifully. Is there any way to sort the directory listing? I have a pretty large domain with approximately 40,000 users and computer scattered accross 165 OUs. As you can imagine, browsing can be quite a challenge.
-Ian 'If we don't do our best to fix a problem, we may as well take blame for it, even if it is not or own.'
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
I am trying to use this tool in Visual Studio 2005, and am having some problems. I have just started developing and need some assistance with the procedure for downloading this tool and adding it to one of my projects. Also, what type of licensing issues exist if I reuse this tool? Thanks in advance for help.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I haven't used it with Visual Studio 2005, but I assume it will work the same way as in VS 2003.
In design mode, right-click on the Toolbox menu and select Add/Remove Items. In the .NET Framework Components tab, click Browse and locate the ADPicker.dll assembly. Click OK and the ADPicker will be added to the list of available Toolbox items. Now, drag the ADPicker control onto your Windows form.
Did that help you?
-- modified at 9:43 Thursday 20th October, 2005
Regarding your licensing issues question: This is a code-sharing site and my code should be considered open source, otherwise known as free for private and commercial consumption. 
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
I receive an error message when I drag the tool onto the form:
Failed to create component 'ADPicker'. The error message follows: 'System.Runtime.InteropServices.COMExtension (0x80070548): The specified domain either does not exist or could not be contacted.
at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_AdsObject() at System.DirectoryServices.PropertyValueCollection.PopulateList() ........
Any ideas?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Thanks very much for taking the time....this was the error. I know this is a common question, but you could offer any insight into why you choose to write in C# over VB? I'm just learning VB so I'm still fascinated with the argument of C# vs VB. Thanks very much for your time.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
 |
|
|
I am getting the same problem. I downloaded both files, compiled everything OK, and then ran the demo app, and got an exception: "An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in system.directoryservices.dll Additional information: The specified domain either does not exist or could not be contacted" at line 29 of ADHelper.cs.
I am not very knowledgeable about Active Directory - that's why I downloaded this, to learn how it works. I'm running on XPSP2 with VS.2003. I don't understand the question "Are you quite certain that your PC is a member of the Active Directory you are trying to browse?"
Any suggestions greatly appreciated.
Dave
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Dave,
The machine you are attempting to run the software on requires it to be connected to an Active Directory for it to work.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
And it also tries to connect during design time. Therefor you need to be connected to you AD network. (I just figured out. Connecting to the office with vpn solved this problem.
Regards from the code junky
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |