[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Sharepoint PeopleEditor control  problem...

Posted on 2008-02-01
7
Medium Priority
?
1,780 Views
Last Modified: 2008-02-13
Hi All -
I'm using C#.

I have a people editor control on my form. There are two buttons that go with the control, A check name button and a browse button. I'm trying to access the check name button Programmatically but i'm not exactly sure how.
The line below works with a standard button:
btnAdd_Click(btnAdd, new System.EventArgs());

Any suggestions?
0
Comment
Question by:JordanBlackler
  • 4
  • 3
7 Comments
 
LVL 4

Expert Comment

by:Warpseh
ID: 20799804
I don't completely understand what you are trying to do, but, i think this may help: CheckButton.PerformClick(), if it doesn't, please tell me a little more of what you want to accomplish.
0
 

Author Comment

by:JordanBlackler
ID: 20799874
Instead of manually clicking the "check name" button i want to be able to write code that will act as if someone was actually clicking the "check name" button.

Does that make any sense?

On Page_Load I populate the people editor textbox with a name, then i want to be able check to see if it is a valid name (using the check name button)
0
 
LVL 4

Expert Comment

by:Warpseh
ID: 20799957
Have you tried the CheckNameButton.PerformClick()? It should work in that case.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 

Author Comment

by:JordanBlackler
ID: 20800007
Oh alright..
What would come before CheckNameButton.PerformClick();
The name of my people editor is:
peopleEditorFCRO
0
 
LVL 4

Expert Comment

by:Warpseh
ID: 20800116
The PerformClick() makes the button click, so, if you are handling the event of the button to check the name in the textbox, just fill the textbox before doing the performclick and it should work.
0
 

Author Comment

by:JordanBlackler
ID: 20800210
This is how i populate it:
strFinancialContactRO = "Smith, Joe";
PickerEntity entity = new PickerEntity();
entity.Key = strFinancialContactRO;
System.Collections.ArrayList entityArrayList = new System.Collections.ArrayList();
entityArrayList.Add(entity);
peopleEditorFCRO.UpdateEntities(entityArrayList);

Then i guess i would would use PeformClick()

But i'm not sure how to do that, could you use some code in an example?
 
0
 
LVL 4

Accepted Solution

by:
Warpseh earned 2000 total points
ID: 20800671
I don't have the possibility to test it right now, but if I'm not wrong, by accessing the peopleeditor.Controls you can get the button Control, and then, perform the click. Try debugging the project, setting a breakpoint in some part of your code where you acces the peopleditor and check the Controls property to see if there is a Button control inside of it. Hope it helped...
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Free Data Recovery software is an advanced solution from Kernel Tools to recover data and files such as documents, emails, database, media and pictures, etc. It supports recovery from physical & logical drive after a hard disk crash, accidental/inte…

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question