ComboBox.clearSelection

Syntax

clearSelection ();

Description

The clearSelection method removes selection from items of the ComboBox component.

Example

To execute the example, in the <head> tag of HTML page add links to PP.js and PP.css files. Create the ComboBox component and a button clicking which deselects all component elements:

<body>
  <div id="tbCont"></div>
  <div id="btnCont"></div>
<script type="text/javascript">
var comboBox = new PP.Ui.ComboBox({
    ParentNode: "tbCont",
    ListBox: {
     Items: [
     { Content: "Yes" },
     { Content: "No" }]
    },
    Width: 140
   });
   comboBox.setSelectedIndex(0);
   var btnAddProvider = new PP.Ui.Button({
    ParentNode: "btnCont",
    Content: "Deselect",
    Click: function () { comboBox.clearSelection();}
   });
</script>
</body>

After executing the example the ComboBox component is placed in the page, and a button is added. Clicking this button removes selection from items of the ComboBox component.

See also:

ComboBox