@model IEnumerable<InputData.Sale>

<h1>
    ComboBox with Objects
</h1>

<p>
    You can use ComboBoxes to select arbitrary Javascript
    objects from arrays:
</p>
<ol>
    <li>
        Set the <b>itemsSource</b> property to the object array,
    </li>
    <li>
        Set the <b>displayMemberPath</b> property to the name of
        the property that should be displayed in the Combo,
    </li>
    <li>
        Optionally set the <b>selectedValuePath</b> property to the
        name of the property that should be used to calculate the
        combo's <b>selectedValue</b> property,
    </li>
    <li>
        Use the combo's <b>selectedIndex</b>, <b>selectedValue</b>,
        or <b>text</b> to retrieve the current selection.
    </li>
</ol>
<label for="theCombo">Select an item:</label>
@(Html.C1().ComboBox<InputData.Sale>().Id("theCombo").Bind(Model).DisplayMemberPath("Country").SelectedValuePath("Sales"))
<p>
    The current text is: <b id="theComboText"></b>.
</p>
<p>
    The selectedIndex is: <b id="theComboIndex"></b>.
</p>
<p>
    The selectedValue is: <b id="theComboValue"></b>.
</p>