Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I was looking at that form earlier, the one you just found, which is what prompted me to ask. The methods below seem to be the ones I'm focusing on the most as it would seem they are responsible for the population of the check box and the checking of each entry. </p> <p>The thing is, what you have now is good, you would just have to substitute your checkbox control into the code rather than create one like they do.</p> <p>EDIT: I went through the <a href="http://www.telerik.com/community/code-library/aspnet-ajax/scheduler/customize-the-advanced-form-with-the-advanced-template-user-controls.aspx" rel="nofollow">Program</a> to see what gets called <strong>in order</strong>, so that you may adjust them accordingly to fit your data.</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { SemanticCheckBoxList resourceValue = new SemanticCheckBoxList(); resourceValue.ID = "ResourceValue"; ResourceValuesPlaceHolder.Controls.Add(resourceValue); if (resourceValue.Items.Count == 0) { PopulateResources(); MarkSelectedResources(); } } private void PopulateResources() { foreach (Resource res in GetResources(Type)) { ResourceValue.Items.Add(new ListItem(res.Text, SerializeResourceKey(res.Key))); } } private IEnumerable&lt;Resource&gt; GetResources(string resType) { List&lt;Resource&gt; availableResources = new List&lt;Resource&gt;(); IEnumerable&lt;Resource&gt; resources = Owner.Resources.GetResourcesByType(resType); foreach (Resource res in resources) { if (IncludeResource(res)) { availableResources.Add(res); } } return availableResources; } private bool IncludeResource(Resource res) { return res.Available || ResourceIsInUse(res); } private string SerializeResourceKey(object key) { LosFormatter output = new LosFormatter(); StringWriter writer = new StringWriter(); output.Serialize(writer, key); return writer.ToString(); } private void MarkSelectedResources() { foreach (Resource res in Appointment.Resources.GetResourcesByType(Type)) { ResourceValue.Items.FindByValue(SerializeResourceKey(res.Key)).Selected = true; } } </code></pre> <p>I'd think the code via the page load wouldn't be used in yours, you would just need to call the methods inside the conditional if statement.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload