title: c# code for combobox to set as optional value?
body: <p>c# code for combobox to set as optional value?
  I Have 3 Dev Express combo box,I need one combo box as optional how to achieve this?</p>
  
  <p>My code is below:</p>
  
  <pre><code>         if (cmbEmployeeIDName.SelectedItem != null)
              {
                  EmployeeId = Convert.ToInt64(cmbEmployeeIDName.SelectedItem.Value);
              }
  
              if (cmbCompany.SelectedItem != null)
              {
                  CompanyId = Convert.ToInt64(cmbCompany.SelectedItem.Value);
              }
              if (cmbDepartment.SelectedItem != null)
              {
                  DepartmentId = Convert.ToInt64(cmbDepartment.SelectedItem.Value);
              }
  </code></pre>