Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, February 22, 2025 
 
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!
 Web Forums - SalesLogix Web Platform & Application Architect
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.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Clearing form controls from C#
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Clearing form controls from C#Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Apr 08 7:42 PM
I have some controls I need to clear if certain options are chosen. I am coding a form started in the AA and exported to VS then linked to SLX. The controls I am having trouble with are some checkboxes, slx date fields and radio groups.

For the checkboxes I have tried checlbox1.Text = ""; checkbox1.Checked = false; checkbox1.text="F"; checkbox1.Checked = "";

For the SLX date control I tried datecontrol1.Text=""; datecontrol1_TXT.Text = ""

I am not sure what I have tried with radio groups.. something like Radiogroup1.SelectedIndex=""; and a few other things..

Thanks
[Reply][Quote]
Jason Huber
Posts: 77
 
Re: Clearing form controls from C#Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Apr 08 11:38 AM
I think your problem is that your controls are bound. If that is the case, which is logical, then you need to change the underlying entity properties NOT the controls themselves.

For your specific question I verified the following when the controls are NOT bound:
On a button click on the form

chkOne.Checked = false; //worked fine.

In fact I did
chkOne.Checked = !chkOne.Checked; //to get it to alternate.

for the datetime

dtOne.DateTimeValue = System.DateTime.Now;
dtOne.Text = dtOne.DateTimeValue .ToString();

for the radiogroup I did:
rdoGroup.SelectedIndex = -1;

When they ARE bound I needed to change the entity property that each control is bound to so that I could see any changes (which makes sense).
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Clearing form controls from C#Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Apr 08 6:43 PM
I've been able to get this to work fine. However, another approach is to create a business rule that sets the necessary property value to whatever you want and then just call that rule when needed.

-Ryan
[Reply][Quote]
 Page 1 of 1 
  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!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 2/22/2025 8:41:42 AM