JQuery DropDownList
Set the autoOpen property of the jqxDropDownButton.
Author: http://jqwidgets.com
Author: http://jqwidgets.com
HTML
<link rel="stylesheet" href="http://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<link rel="stylesheet" href="http://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
<script src="http://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<div id="grid"></div>
JavaScript
var data = [
{"id": "1", "name": "Corporate Headquarters","row_status": "-1"},
{"id": "2", "name": "Finance Division", "row_status": "1"}
];
var source =
{
dataType: "json",
dataFields: [
{ name: "id", type: "number" },
{ name: "name", type: "string" },
{ name: "row_status", type: "number" }
],
localData: data,
id: "id"
};
var dataAdapter = new jQuery.jqx.dataAdapter(source, {loadComplete: function () {}});
var rowstatus = [
{primaryindex:"-1", label:"Unrated"},
{primaryindex:"1", label:"Unconfirmed"},
{primaryindex:"2", label:"Suspect"},
{primaryindex:"3", label:"Confirmed"},
{primaryindex:"4", label:"Obsolete"},
{primaryindex:"5", label:"Changed"},
{primaryindex:"6", label:"New"},
{primaryindex:"7", label:"Baseline"}];
var source = ["Corporate Headquarters", "Finance Division", "Accounting Department", "Investment Department",
"Banking Office", "Bonds Office", "Operations Division", "Manufacturing Department",
"Public Relations Department", "Sales Department", "Research Division"];
jQuery("#grid").jqxGrid(
{
width: 900,
source: dataAdapter,
editable: true,
columns: [
{ text: 'ID', editable: false, dataField: 'id', width: 150 },
{
text: 'Name',
dataField: 'name',
width: 250,
columnType: "dropdownlist",
createEditor: function (row, cellvalue, editor, cellText, width, height)
{
editor.jqxDropDownList({autoDropDownHeight: true, source: source });
}
},
{ text: 'Row...