Home
|
Forums
|
Contact
|
Search
|
Syndication
[login]
[create account]
Saturday, February 22, 2025
slxdeveloper.com
Home
Search
Contact us
About slxdeveloper
Syndication
Community
Forums
(NEW!)
Newsletter Archive
Members
Your Profile
Submit Article
General
Administration
(6)
OLE DB Provider
Miscellaneous
(2)
Architect
VBScript
(9)
ActiveX Controls
(6)
How To's
(14)
.NET Extensions
(3)
External
OLE DB Provider
(12)
SLAPI (SlgxApi.dll)
SalesLogix COM
(1)
Web
ASP/ASP.NET
(2)
Web Services
Web Client
Downloads
Samples
(17)
Documentation
(7)
Utilities
(18)
Resources
SalesLogix
(3)
Programming
(1)
2/22/2025 8:00:15 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!
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 Thread
View:
Dynamic
Flat
Tree
Search:
Author
Thread: C# / radiogroup question
Steve Knowles
Posts: 657
C# / radiogroup question
Posted: 05 Mar 08 10:05 AM
I am trying to use the C# Code snippet at the bottom of the page to toggle a control's visibility on and off..
I am getting the error "'System.Web.UI.WebControls.ListItemCollection' does not contain a definition for 'text' "
I have two Items with text/value of Yes and No. I am having trouble with the syntax to access these properties... This is my latest attempt "(MarketingICContact.Items.text=="Yes")"
What am I looking for here? Thanks
Sage.Entity.Interfaces.IODMCERTPC objODM = BindingSource.Current as Sage.Entity.Interfaces.IODMCERTPC;
if (MarketingICContact.Items.text=="Yes")
{
MarketingContactName.Visible = false;
}
else
{
MarketingContactName.Visible = true;
}
[
Reply
][
Quote
]
Steve Knowles
Posts: 657
Re: C# / radiogroup question
Posted: 05 Mar 08 12:05 PM
Got it: 'if (MarketingICContact.Items.text=="Yes")' should be 'if (MarketingICContact.SelectedIndex==1)'
[
Reply
][
Quote
]
Steve Knowles
Posts: 657
Re: C# / radiogroup question
Posted: 06 Mar 08 8:20 AM
Ok, I got my first set of controls toggling visible/hidden with a C# snippet in the onchange property of the radio group. I tried the same code with a second set of controls toggled by a radio button and am getting the following error:
'StringConverter' is unable to convert 'System.String' to 'System.Web.UI.WebControls.ListItemCollection'
Here is the code that works:
Sage.Entity.Interfaces.IODMCERTPC objODM = BindingSource.Current as Sage.Entity.Interfaces.IODMCERTPC;
if (MarketingICContact.SelectedIndex==1)
{
MarketingContactName.Visible = false;
MarketingContactName_lz.Visible = false;
MarketingContactEmail.Visible = false;
MarketingContactEmail_lz.Visible = false;
MarketingContactPhone.Visible = false;
MarketingContactPhone_lz.Visible = false;
ICContactName.Visible = false;
ICContactName_lz.Visible = false;
ICContactEmail.Visible = false;
ICContactEmail_lz.Visible = false;
ICContactPhone.Visible = false;
ICContactPhone_lz.Visible = false;
}
else
{
MarketingContactName.Visible = true;
MarketingContactName_lz.Visible = true;
MarketingContactEmail.Visible = true;
MarketingContactEmail_lz.Visible = true;
MarketingContactPhone.Visible = true;
MarketingContactPhone_lz.Visible = true;
ICContactName.Visible = true;
ICContactName_lz.Visible = true;
ICContactEmail.Visible = true;
ICContactEmail_lz.Visible = true;
ICContactPhone.Visible = true;
ICContactPhone_lz.Visible = true;
}
Here is the code that fails:
Sage.Entity.Interfaces.IODMCERTPC objODM = BindingSource.Current as Sage.Entity.Interfaces.IODMCERTPC;
if (CertTestKit.SelectedIndex==1)
{
CertRecipName.Visible = false;
CertRecipName_lz.Visible = false;
CertRecipEmail.Visible = false;
CertRecipEmail_lz.Visible = false;
CertRecipAddress.Visible = false;
CertRecipAddress_lz.Visible = false;
}
else
{
CertRecipName.Visible = true;
CertRecipName_lz.Visible = true;
CertRecipEmail.Visible = true;
CertRecipEmail_lz.Visible = true;
CertRecipAddress.Visible = true;
CertRecipAddress_lz.Visible = true;
}
Has anyone seen this or know what may be happening? I have triple checked the control names and they are correct..
[
Reply
][
Quote
]
Steve Knowles
Posts: 657
Re: C# / radiogroup question
Posted: 06 Mar 08 6:30 PM
Mapping issue - Radio group was mapped to text, not items. DOH!
[
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
|
page cache (param): 2/22/2025 8:41:52 AM