﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebScheduler - How to set value on the combo from the webscheduler</title><link>http://www.intersoftsolutions.com/Community/WebScheduler/How-to-set-value-on-the-combo-from-the-webscheduler/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>How to set value on the combo from the webscheduler</title><link>http://www.intersoftsolutions.com/Community/WebScheduler/How-to-set-value-on-the-combo-from-the-webscheduler/</link><pubDate>Thu, 11 Aug 2011 23:59:05 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;
            &lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;
                I’m currently still investigating this scenario and need more time to provide you
                with solution, suggestion, or sample.&lt;br /&gt;
                I’ll get back to you as soon as possible.&lt;/span&gt;&lt;/p&gt;
        &lt;br /&gt;
        &lt;p&gt;
            &lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;
                [Edit]&lt;/span&gt;&lt;/p&gt;
        &lt;blockquote&gt;
            &lt;p&gt;
                How can I set the value on the combo from the webscheduler?&lt;/p&gt;
            &lt;p&gt;
                eg.: I would like to open the pop up from the webscheduler and set the default value
                for the field category on the Page_Load.&lt;/p&gt;
        &lt;/blockquote&gt;
        &lt;p&gt;
            &lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;
                There are two pop up of WebScheduler, the WebCallOut control and the editing form.
                I assume that the pop up on your required scenario is the editing form.&lt;/span&gt;&lt;/p&gt;
        &lt;p&gt;
            &lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;
                Please follow the step-by-step below in order to set the default value for the field
                category of WebScheduler’s editing form.&lt;/span&gt;&lt;/p&gt;
        &lt;ol style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;
            &lt;li&gt;Add OnEditingFormInitialize client-side event in WebScheduler.&lt;br /&gt;
                The snippet code below shows the code after adding the OnEditingFormInitialize client-side
                event of WebScheduler.&lt;pre&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: #a31515;"&gt;ISWebScheduler&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;:&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: #a31515;"&gt;WebScheduler&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: red;"&gt;ID&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;="WebScheduler1"&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: red;"&gt;runat&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;="server"&lt;/span&gt; ...&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: #a31515;"&gt;ClientSideEvents&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: red;"&gt;OnEditingFormInitialize&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;="WebScheduler1_OnEditingFormInitialize" /&amp;gt;&lt;/span&gt;
    ...
&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: #a31515;"&gt;ISWebScheduler&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;:&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: #a31515;"&gt;WebScheduler&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
                &lt;br /&gt;
                &lt;pre&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;function&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: Black"&gt;WebScheduler1_OnEditingFormInitialize(controlId, action, eventView, eventType, newType) {&lt;/span&gt;
    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;var&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: Black"&gt;WebScheduler1 = ISGetObject(controlId);&lt;/span&gt;

    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;return true;&lt;/span&gt;
&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: Black"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
            &lt;/li&gt;
            &lt;li&gt;Access the editing form window object using the GetEditingFormWindow() method.&lt;br /&gt;
                &lt;pre&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;function&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;WebScheduler1_OnEditingFormInitialize(controlId, action, eventView, eventType, newType) {&lt;/span&gt;
    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;var&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;WebScheduler1 = ISGetObject(controlId);&lt;/span&gt;
    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;var&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;editingForm = WebScheduler1.GetEditingFormWindow();&lt;/span&gt;
    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;var&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;wcCategories = editingForm.ISGetObject(&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: #a31515;"&gt;"wcCategories"&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;);&lt;/span&gt;

    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;return true;&lt;/span&gt;
&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
            &lt;/li&gt;
            &lt;li&gt;Set the desired selected row of WebCombo.&lt;br /&gt;
                &lt;pre&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;function&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;WebScheduler1_OnEditingFormInitialize(controlId, action, eventView, eventType, newType) {&lt;/span&gt;
    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;var&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;WebScheduler1 = ISGetObject(controlId);&lt;/span&gt;
    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;var&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black;"&gt;editingForm = WebScheduler1.GetEditingFormWindow();&lt;/span&gt;
    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;var&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black;"&gt;wcCategories = editingForm.ISGetObject(&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: #a31515;"&gt;"wcCategories"&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;);&lt;/span&gt;

    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;wcCategories.SetSelectedIndex(2);&lt;/span&gt;

    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;return true;&lt;/span&gt;
&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
            &lt;/li&gt;
        &lt;/ol&gt;
        &lt;p&gt;
            &lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;
                There are four different way to set a value of WebCombo using client-side script.&lt;/span&gt;&lt;/p&gt;
        &lt;ul style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;
            &lt;li&gt;Set value directly.&lt;pre&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;function&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;ValueDirectly()
{&lt;/span&gt;
    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;var&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;combo = ISGetObject(&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: #a31515;"&gt;"WebCombo1"&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;);
    combo.SetText(&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: #a31515;"&gt;"Brian"&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;);
    alert(&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: #a31515;"&gt;"Text set to Brian"&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;);
}&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
            &lt;/li&gt;
            &lt;li&gt;Set value by index.&lt;pre&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;function&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;ValueIndex()
{&lt;/span&gt;
    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;var&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;combo = ISGetObject(&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: #a31515;"&gt;"WebCombo1"&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black"&gt;);
    combo.SetSelectedIndex(2);
    alert(&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: #a31515;"&gt;"Set value by index 2"&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black;"&gt;);
}&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
            &lt;/li&gt;
            &lt;li&gt;Set value by key value.&lt;pre&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;function&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black;"&gt;keyValue()
{
    var combo = ISGetObject(&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: #a31515;"&gt;"WebCombo1"&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black;"&gt;);
    combo.SetSelectedRowByValue(&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: #a31515;"&gt;"Andrew"&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black;"&gt;);
    alert(&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: #a31515;"&gt;"Set value by KeyValue Andrew"&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black;"&gt;);
}&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
            &lt;/li&gt;
            &lt;li&gt;Set value by row index.&lt;pre&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;function&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black;"&gt;ValueRow()
{&lt;/span&gt;
    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;var&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black;"&gt;combo = ISGetObject(&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: #a31515;"&gt;"WebCombo1"&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black;"&gt;);&lt;/span&gt;
    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;var&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black;"&gt;rows = combo.GetRows();&lt;/span&gt;
    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: blue;"&gt;var&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black;"&gt;row = rows[1];
    row.Select();
    alert(&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: #a31515;"&gt;"Set value by calling Select() method of a WebComboRow object"&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt; color: black;"&gt;);
}&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
        &lt;p&gt;
            &lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;
                [Edit]&lt;/span&gt;&lt;/p&gt;
        &lt;blockquote&gt;
            &lt;p&gt;
                Part of the same question. How can I use the code behind on the EditingForm popup
                from the webscheduler?&lt;br /&gt;
                Every example that I saw tha EditingForm does not have the file .cs&lt;/p&gt;
        &lt;/blockquote&gt;
        &lt;p&gt;
            &lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;
                In the current build version of WebScheduler, WebScheduler 3.0, it is not possible
                to use the code behind on the EditingForm of WebScheduler.&lt;/span&gt;&lt;/p&gt;
        &lt;p&gt;
            &lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;
                The way how the EditingForm works is described as follow. The data of the selected
                event is serialized and sent to the client-side. When the EditingForm is invoked,
                the EditingForm obtained the data of the selected event from client-side and set
                the default value for each controls.&lt;/span&gt;&lt;/p&gt;
        &lt;p&gt;
            &lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;
                Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>How to set value on the combo from the webscheduler</title><link>http://www.intersoftsolutions.com/Community/WebScheduler/How-to-set-value-on-the-combo-from-the-webscheduler/</link><pubDate>Thu, 11 Aug 2011 11:10:39 GMT</pubDate><dc:creator>rlullez</dc:creator><description>We are evaluating the webscheduler and I have a question.
&lt;p&gt;How can I set the value on the combo from the webscheduler?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;eg.: I would like to open the pop up from the webscheduler and set the default value for the field category on the Page_Load.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Part of the same question. How can I use the code behind on the EditingForm popup from the webscheduler? &lt;br /&gt;&lt;br /&gt;Every example that I saw tha EditingForm does not have the file .cs&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Rodrigo&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>