3/18/2026 5:42:10 PM
|
| |
| slxdeveloper.com Community Forums |
|
| |
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
|
|
|
|
Question about looping through controls of a form interface
Posted: 16 Sep 09 8:25 AM
|
Hi everyone,
I have a question about how to properly use form.Controls. form is essentially Sage.Form.Interfaces.(whatever the name of your form is). Anyway my question is how can I loop through a collection of controls of an interface. I have tried: foreach (System.Web.UI.WebControls.CompositeControl c in form.Controls) and foreach (System.Web.UI.Control c in form.Controls) and foreach(Sage.Platform.Controls.IControl c in form.Controls)
I have tried various other methods but these seemed the most reasonable. Any and all help would be appreciated.
Thank you, Ali |
|
|
| |
|
Re: Question about looping through controls of a form interface
Posted: 30 Sep 09 8:55 AM
|
Hi Todd,
The techniques above did not work for me. I am looking for a way to loop through a collection of the controls on the page without using javascript. I noticed the .Controls collection but was unfamiliar about how to loop through it. Do you know of a way of being able to loop through the controls of the interface in C#?
Thanks in advance, Ali |
|
|
|
Re: Question about looping through controls of a form interface
Posted: 01 Oct 09 1:55 AM
|
Best route would likely be to cast the form interface type passed to the method to it's native type:
UserControl nativeform = (UserControl)form.NativeForm; // Could also use as SmartPart, EntityBoundSmartPart, or even the MyQuickFormName foreach (Control c in nativeform.Controls) { //do something }
Give that a try.
-Ryan |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|