6/29/2025 1:32:02 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.
|
|
|
|
Check Box enabled state in code behind
Posted: 05 Oct 10 7:31 AM
|
I am having an issue with changing a check box enabled state in code behind (code below). If I remove the databinding (OnAddEntityBindings) then the issue no longer exists. Should I remove the bindings by default and load in the values on page load through an sql query or something along them lines or is there a way to do this and still keep the bindings?
<table border="0" cellpadding="1" cellspacing="0" class="formtable"> <tr> <td >
Text="<%$ resources: chkCaseStudy.Caption %>" TextAlign="left" Enabled = '<%# ControlEnabled() %>' />
</td> <td >
</td> </tr> <tr> <td > TextMode="MultiLine" Columns="40" />
</td> <td></td> </tr> </table>
<script runat="server" type="text/C#"> public override Type EntityType { get { return typeof(Sage.Entity.Interfaces.IAccount); } }
protected override void OnAddEntityBindings() { // chkCaseStudy.Checked Binding Sage.Platform.WebPortal.Binding.WebEntityBinding chkCaseStudyCheckedBinding = new Sage.Platform.WebPortal.Binding.WebEntityBinding("ZAccountExt.ZCaseStudy", chkCaseStudy, "Checked"); BindingSource.Bindings.Add(chkCaseStudyCheckedBinding); // txtComments.Text Binding Sage.Platform.WebPortal.Binding.WebEntityBinding txtCommentsTextBinding = new Sage.Platform.WebPortal.Binding.WebEntityBinding("ZAccountExt.ZComments", txtComments, "Text"); BindingSource.Bindings.Add(txtCommentsTextBinding); // txtStarCom.Text Binding Sage.Platform.WebPortal.Binding.WebEntityBinding txtStarComTextBinding = new Sage.Platform.WebPortal.Binding.WebEntityBinding("ZAccountExt.ZStarComments", txtStarCom, "Text"); BindingSource.Bindings.Add(txtStarComTextBinding); }
protected void Page_Load(object sender, EventArgs e) { chkCaseStudy.DataBind(); }
public bool ControlEnabled() { IAccount account = BindingSource.Current as IAccount;
if (account.ZAccountExt.ZREDFLAG2 == "Red") { return true; } else { return false; } }
protected override void OnWireEventHandlers() { base.OnWireEventHandlers(); } |
|
|
|
Re: Check Box enabled state in code behind
Posted: 06 Oct 10 6:32 AM
|
I found some binding on the account details screen similar to chkCaseStudyCheckedBinding.IgnoreFLSDisabling = true; so I decided to put that in to see if it makes a difference and it did. |
|
|
|
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!
|
|
|
|
|
|
|
|