title: Setting a ComboBox value using callback
body: <p>I have an Asp.net page with 3 combobox and 1 button. The first combobox selection will affect the other 2 combobox datasource. I'm setting the datasource for the other combobox using a callback function.
  After the user choose from all the combobox, the user click the button and a postback is generate. 
  My Problem is that the server side code, is not aware of the selections made in the page, 
  if i try to get the value from the combobox I get null allways.
  looking for a solution.</p>
  
  <p>Thank you.</p>
  
  <p>Code</p>
  
  <pre><code>Code of aspx
  &lt;script type="text/javascript"&gt;
      // &lt;![CDATA[
          function OnProductChange(cb_Products) {
              cb_Packing.PerformCallback(cb_Products.GetValue().toString());
              cb_ProductionSite.PerformCallback(cb_Products.GetValue().toString());
          }
          function OnPackChange(cb_Products) {
              ASPxComboBox1.PerformCallback(cb_Packing.GetValue().toString());
          }`enter code here`
          function OnFactoryChange(cb_Products) {
              cb_ProductionSite.PerformCallback();
          }
      // ]]&gt; 
      &lt;/script&gt;
  
  &lt;PanelCollection&gt;
              &lt;dx:PanelContent runat="server" SupportsDisabledAttribute="True"&gt;
                  &lt;dx:ASPxLabel ID="ASPxLabel1" runat="server" Font-Bold="True" Font-Names="Snap ITC"
                      Font-Size="Medium" Font-Underline="True" ForeColor="#333333" Text="Production Form (DEMO)"&gt;
                  &lt;/dx:ASPxLabel&gt;
                  &lt;br /&gt;
                  &lt;br /&gt;
                  &lt;dx:ASPxLabel ID="ASPxLabel2" runat="server" Font-Names="Berlin Sans FB Demi" Font-Size="Medium"
                      Text="Select Product" ForeColor="#FF3300"&gt;
                  &lt;/dx:ASPxLabel&gt;
                  &lt;dx:ASPxComboBox ID="cb_Products" runat="server" ValueType="System.String" Font-Names="Berlin Sans FB Demi"
                      DataSourceID="EntityDataSource1" Spacing="3" TextField="PC_Name" EnableSynchronization="False"
                      ValueField="PCID" ClientIDMode="Static" DropDownStyle="DropDownList"&gt;
                      &lt;Columns&gt;
                          &lt;dx:ListBoxColumn Caption="Product's name" FieldName="PCID" Visible="false" /&gt;
                          &lt;dx:ListBoxColumn Caption="Product's name" FieldName="PC_Name" /&gt;
                      &lt;/Columns&gt;
                      &lt;ClientSideEvents SelectedIndexChanged=" function(s,e) { OnProductChange(s); }" /&gt;
                  &lt;/dx:ASPxComboBox&gt;
                  &lt;asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=TrackQREntities"
                      DefaultContainerName="TrackQREntities" EnableFlattening="False" EntitySetName="TrackQR_ProductsCatalog"
                      Select="it.[PC_Name], it.[PCID]" Where="it.[ClientID] == 11"&gt;
                  &lt;/asp:EntityDataSource&gt;
                  &lt;br /&gt;
                  &lt;br /&gt;
                  &lt;dx:ASPxLabel ID="ASPxLabel3" runat="server" Font-Names="Berlin Sans FB Demi" Font-Size="Medium"
                      Text="Packing Options" ForeColor="#FF3300"&gt;
                  &lt;/dx:ASPxLabel&gt;
                  &lt;dx:ASPxComboBox ID="cb_Packing" runat="server" Font-Names="Berlin Sans FB Demi"
                      ValueType="System.String" ClientIDMode="Static" DropDownStyle="DropDown" EnableSynchronization="False"
                      OnCallback="Packing_Callback" TextField="PackQuantity"
                      ValueField="PackID" ClientInstanceName="cb_Packing" 
                      EnableCallbackMode="True"&gt;
                      &lt;Columns&gt;
                          &lt;dx:ListBoxColumn FieldName="PackID" Visible="False" /&gt;
                          &lt;dx:ListBoxColumn Caption="Pack Quantity" FieldName="PackQuantity" /&gt;
                      &lt;/Columns&gt;
                      &lt;ClientSideEvents SelectedIndexChanged=" function(s,e) { OnPackChange(s); }" /&gt;
                  &lt;/dx:ASPxComboBox&gt;
                  &lt;br /&gt;
                  &lt;br /&gt;
                  &lt;dx:ASPxLabel ID="ASPxLabel4" runat="server" Font-Names="Berlin Sans FB Demi" Font-Size="Medium"
                      Text="Production Site" ForeColor="#FF3300"&gt;
                  &lt;/dx:ASPxLabel&gt;
                  &lt;dx:ASPxComboBox ID="cb_ProductionSite" runat="server" Font-Names="Berlin Sans FB Demi"
                      ValueType="System.String" ClientIDMode="Static" DropDownStyle="DropDown" EnableSynchronization="False"
                      TextField="LLName" ValueField="LLID" 
                      ClientInstanceName="cb_ProductionSite" EnableCallbackMode="True" 
                      OnCallback="cb_ProductionSite_Callback" 
                       &gt;
                      &lt;Columns&gt;
                          &lt;dx:ListBoxColumn FieldName="LLID" Visible="False" /&gt;
                          &lt;dx:ListBoxColumn Caption="Factory Name" FieldName="LLName" /&gt;
                      &lt;/Columns&gt;
                      &lt;ClientSideEvents SelectedIndexChanged=" function(s,e) { OnFactoryChange(s); }" /&gt;
                  &lt;/dx:ASPxComboBox&gt;
                  &lt;br /&gt;
                  &lt;br /&gt;
                  &lt;dx:ASPxLabel ID="ASPxLabel5" runat="server" Font-Names="Berlin Sans FB Demi" Font-Size="Medium"
                      Text="Number of Products" ForeColor="#FF3300"&gt;
                  &lt;/dx:ASPxLabel&gt;
                  &lt;dx:ASPxTextBox ID="atb_Quantity" runat="server" Width="170px"&gt;
                  &lt;/dx:ASPxTextBox&gt;
                  &lt;br /&gt;
                  &lt;dx:ASPxButton ID="ab_Produce" runat="server" Text="Produce" 
                      Font-Names="Arial Black" Font-Size="Medium" OnClick="ab_Produce_Click" 
                      CssFilePath="~/App_Themes/SoftOrange/{0}/styles.css" CssPostfix="SoftOrange" 
                      SpriteCssFilePath="~/App_Themes/SoftOrange/{0}/sprite.css"&gt;
                  &lt;/dx:ASPxButton&gt;
                  &lt;dx:ASPxComboBox ID="ASPxComboBox1" runat="server" Font-Names="Berlin Sans FB Demi"
                      ValueType="System.String" ClientIDMode="Static" DropDownStyle="DropDown" EnableSynchronization="False"
                      TextField="LLName" ValueField="LLID" 
                      ClientInstanceName="cb_ProductionSite" EnableCallbackMode="True" 
                      OnCallback="cb_ProductionSite_Callback" 
                       &gt;
                      &lt;Columns&gt;
                          &lt;dx:ListBoxColumn FieldName="LLID" Visible="False" /&gt;
                          &lt;dx:ListBoxColumn Caption="Factory Name" FieldName="LLName" /&gt;
                      &lt;/Columns&gt;
                      &lt;ClientSideEvents SelectedIndexChanged=" function(s,e) { OnFactoryChange(s); }" /&gt;
                  &lt;/dx:ASPxComboBox&gt;
                  &lt;br /&gt;
                  &lt;br /&gt;
              &lt;/dx:PanelContent&gt;
  
  Code of aspx.cs
  
  protected void Packing_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
          {
              //if (e.Parameter != "")
              //{
                  using (TrackQREntities te = new TrackQREntities())
                  {
                      int id = int.Parse(e.Parameter);
                      var product = te.TrackQR_ProductsCatalog.Where(s =&gt; s.PCID == id).FirstOrDefault();
                      cb_Packing.DataSource = product.TrackQR_PacksType.ToList();
                      cb_Packing.DataBind();
  
                      cb_Products.SelectedIndex = id;
               //   }
              }
  
          }
  
          protected void cb_ProductionSite_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
          {
              if (e.Parameter != "")
              {
                  using (TrackQREntities te = new TrackQREntities())
                  {
                      cb_ProductionSite.DataSource = te.TrackQR_LogisticLocations.Where(s =&gt; s.LLTypesID == 1).ToList();
                      cb_ProductionSite.DataBind();
                  }
              }
          }
  
  protected void ab_Produce_Click(object sender, EventArgs e)
          {
  
  cb_ProductionSite.Value.ToString(); &lt;--- Error Value is null
  </code></pre>