<link rel="stylesheet" type="text/css" href="dbnetsuite.css.ashx" /> <script language="JavaScript" src="dbnetsuite.js.ashx"></script>
<script> jQuery(document).ready( init ) var dbnetgrid1 ////////////////////////////////////////// function init() ////////////////////////////////////////// { dbnetgrid1 = new DbNetGrid("dbnetgrid1"); with (dbnetgrid1) { connectionString = "SamplesDatabase" fromPart = "Products" setColumnExpressions("ProductName","UnitPrice","UnitsInStock", "Discontinued"); setColumnProperty("Discontinued","booleanDisplayMode", document.getElementById("boolean_style").value); setColumnProperty("Discontinued","filter", true); initialize() } } ////////////////////////////////////////// function setBooleanDisplayMode() ////////////////////////////////////////// { with (dbnetgrid1) { setColumnProperty("Discontinued","booleanDisplayMode", document.getElementById("boolean_style").value); initialize() } } </script>
Boolean Display Mode<select id="boolean_style" onchange="setBooleanDisplayMode()"> <option value="YesNo">YesNo <option value="Checkbox">Checkbox <option value="TrueFalse">TrueFalse </select> <div id="dbnetgrid1"></div>
<style> div.text-container { height:50px; width:200px; overflow-y:scroll; } </style>