9/18/2025 5:46:00 AM
|
|
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.
|
|
|
|
Clearing form controls from C#
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 |
|
|
|
Re: Clearing form controls from C#
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). |
|
|
|
Re: Clearing form controls from C#
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 |
|
|
|
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!
|
|
|
|
|
|
|
|