Example
Source
Run as server control
DbNetGrid can be added to any web page as a client-side object with just a few lines of code.
Include the Javascript library file
<script src="../dbnetgrid.js"></script>
Client-side script
window.onload = initGrid ////////////////////////////////////////////////////////////////////////////////////////////// function initGrid() ////////////////////////////////////////////////////////////////////////////////////////////// { var dbnetgrid1 = new DbNetGrid( "dbnetgrid1" ) with ( dbnetgrid1 ) { connectionString = "samples" fromPart = "customers" primaryKeyColumn = "customerid" view = true viewPrint = true profile = true loadData() } } ////////////////////////////////////////////////////////////////////////////////////////////// function customEditErrorMessage(editControl) ////////////////////////////////////////////////////////////////////////////////////////////// { var serverMessage = ['operation must use an updateable query', 'database or object is read-only', 'could not delete from specified tables'] for (var i = 0; i<serverMessage.length; i++) { if (editControl.errorMessage.toLowerCase().indexOf(serverMessage[i])) { var msg = 'Database table is read-only, this is usually related to the\n' + 'permissions on the file nwind.mdb in the samples folder.\n\n' + 'To correct this problem:\n\n' + '\t1. Select the file using Windows Explorer\n' + '\t2. Right-click on the file and select Properties\n' + '\t3. Select the Security tab\n' + '\t4. Assign "Full Control" to "Everyone" and click "OK"\n\n' + 'If the problem persists then contact support@dbnetedit.com' alert(msg) editControl.errorMessage = 'Database nwind.mdb is read-only' break } } }
HTML
<div id=dbnetgrid1></div>