Client API Reference

Top  Previous  Next

Basic Properties

The simplest form can be created by specifying just the connectionString and fromPart properties

connectionString (string)

The connectionString property provides the information necessary to connect to the database. The connection string can either be an actual connection string or an alias which is resolved by finding a matching entry in the <connectionStrings> section of the web.config file. For details of specifying connection strings see the database connectivity section.

fromPart (string)

The FromPart property specifies the name of the table for which the edit form should be generated.

	<script>
	jQuery(document).ready( init )

	function init()
	{
		var dbnetgrid1 = new DbNetEdit("dbnetgrid1");
		with (dbnetgrid1)
		{
			connectionString = "SamplesDatabase"
			fromPart = "Customers"

			initialize()
		}
	}
	</script>

Run Sample

Additional Properties

advancedSearch (boolean)

Enables/disables the advanced search dialog

advancedSearchDialog (object)

Reference to the Advanced Search Dialog object

audit (string)

Enables tracking of the date and the user that  changes made to the record. Possible values are none, summary and detail. In summary mode only the date/user of the last change to a record is recorded, in detail mode all changes to the record are recorded and can be viewed in the Audit History dialog.

Run Sample

Auditing can also be implemented at the column level if changes to a specific column need to be tracked.

auditDateFormat (string)

Controls the format of the last modified date displayed when auditing is enabled.

auditUser (string)

Identifies the user that made a change when auditing is enabled. If the web application page is authenticated then the property will default to the authenticated user.

browseDialogHeight (string)

Specifies the height of the browse dialog

Run Sample

browseDialogWidth (string)

Specifies the width of the browse dialog

commandTimeout (number)

Specifies the number of seconds the grid population query should run before timing out. The default is 30 seconds. A value of 0 will prevent the query from timing out at all.

	<script>
	jQuery(document).ready( init )

	function init()
	{
		var dbnetedit1 = new DbNetGrid("dbnetedit1");
		with (dbnetedit1)
		{
		  ...
			commandTimeout = 120;
			initialize()
		}
	}
	</script>

Run Sample

customProfileProperties (array)

User profiles can also save information other than edit properties by adding an element to the customProfileProperties array property with either the name of a window property or a jQuery id or class selector that matches an input, select or textarea element. The values in these elements/variables will be saved and restored with the profile

dbNetSpell (object)

Reference to the DbNetSpell object that is used to configure the DbNetSpell object when integrated spell checking is enabled. If the connectionString property is not specified then edit connection string is used.

	<script>
	jQuery(document).ready( init )

	function init()
	{
		var dbnetedit1 = new DbNetEdit("dbnetedit1");
		with (dbnetedit1)
		{
			connectionString = "SamplesDatabase"
			fromPart = "employees"
			setColumnProperty("notes","editcontroltype","textarea")
			spellCheck = true
			dbNetSpell.connectionString = "DictionaryDatabase";
			dbNetSpell.dictionaryTableName = "english_us";
			initialize()
		}
	}
	</script>

Run Sample

fixedFilterSql (string)

Specifies a filter to applied to the selected records.

	<script>
	jQuery(document).ready( init )

	function init()
	{
		var dbnetgrid1 = new DbNetGrid("dbnetgrid1");
		with (dbnetgrid1)
		{
			...
			fixedFilterSql="Country = 'UK'"
			initialize()
		}
	}
	</script>

 

fixedFilterParams (object)

Used in combination with the fixedFilterSql parameter to supply parameter values.

	<script>
	jQuery(document).ready( init )

	function init()
	{
		var dbnetgrid1 = new DbNetGrid("dbnetgrid1");
		with (dbnetgrid1)
		{
			...
			fixedFilterSql="Country = @country"
			fixedFilterParams = {country : "USA"}
			initialize()
		}
	}
	</script>

Run Sample

insertOnly (boolean)

If set to true the edit form will automatically enter insert mode when initialized and remain so after a record is inserted.

Run Sample

layoutColumns (number)

Defines the number of columns over which the generated DbNetEdit layout is distributed (defaults to 1)

Run Sample

 

orderBy (string)

Set the initial order by which records are returned.

	<script>
	jQuery(document).ready( init )

	function init()
	{
		var dbnetedit1 = new DbNetEdit("dbnetedit1");
		with (dbnetedit1)
		{
			...
			orderBy = "companyname"
			initialize()
		}
	}
	</script>

Run Sample

parentFilterSql (string)

Specifies a filter to applied to a child grid by the parent control. Set automatically but can be overridden or supplemented in the onParentFilterAssigned event.

parentFilterParams (object)

Used in combination with the parentFilterSql parameter to supply parameter values.

primaryKey (object)

Primary key value(s) for the current record

profileUser (string)

Identifies the user against which User Profiles will be saved. If the web application is authenticated then the property will default to the authentciated user. If an application is using a custom authentication method then the property can be set in a manner similar to the following code.

	<script>
	jQuery(document).ready( init )

	function init()
	{
		var dbnetedit1 = new DbNetEdit("dbnetedit1");
		with (dbnetedit1)
		{
			...
			profileUser = "<%=Session["userid"]%>"
			// Line above assumes the authenticated user id is held in a server-side session variable
			initialize()
		}
	}
	</script>

searchDialog (object)

Reference to the Standard Search Dialog object

searchDialogHeight (number)

Fixes the height of the search dialog when there are a lot of searchable columns. Fields will scroll inside dialog

	<script>
	jQuery(document).ready( init )

	function init()
	{
		var dbnetedit1 = new DbNetEdit("dbnetedit1");
		with (dbnetedit1)
		{
			...
			searchDialogHeight="200px"
			initialize()
		}
	}
	</script>

Run Sample

searchDialogMode (string)

Specifies the default search mode. Can be set to either Simple, Standard or Advanced

Run Sample

searchFilter (array of objects)

Search filter generated by the Standard and Advanced search dialogs. Property contains an array of objects each with the following properties

sql

array of strings

The search sql statements

params

object

Parameter values for the placeholders in the sql property

join

string

The operator used to join the sql statements (and / or )

searchFilterSql (string)

Specifies an initial filter to applied to the selected grid rows. The filter is overridden by the search dialog.

	<script>
	jQuery(document).ready( init )

	function init()
	{
		var dbnetedit1 = new DbNetEdit("dbnetedit1");
		with (dbnetedit1)
		{
			...
			searchFilterSql="Country = 'UK'"
			initialize()
		}
	}
	</script>

 

searchFilterParams (object)

Used in combination with the searchFilterSql proeprty to supply parameter values.

	<script>
	jQuery(document).ready( init )

	function init()
	{
		var dbnetedit1 = new DbNetEdit("dbnetedit1");
		with (dbnetedit1)
		{
			...
			searchFilterSql="Country = @country"
			searchFilterParams = {country : "USA"}
			initialize()
		}
	}
	</script>

 

searchFilterText (string)

Displayable descriptive text version of the search dialog criteria .

Run Sample

searchLayoutColumns (number)

Specifies the number of columns over which the search criteria are distributed

Run Sample

searchValuesOnly (boolean)

Specifies if only the search values are selectable in the search dialog/panel

Run Sample

searchPanelId (string)

The searchPanelId property allows you to specify the Id or Class Name of an HTML element to be used as the container of the search control (instead of the Search Dialog)

Run Sample

simpleSearch (boolean)

Enables/disables the simple search dialog

simpleSearchDialog (object)

Reference to the Simple Search Dialog object

spellCheck (boolean)

Indicates that a spell checking should be enabled for all the text columns longer that 29 characters. To enable spell checking for particular columns use the column spellCheck property. The DbNetSpell object can be configure via the dbNetSpell property.

Run Sample

standardSearch (boolean)

Enables/disables the standard search dialog

totalRows (number)

The total number of rows selected

 

Toolbar Properties

The following properties control the buttons and information displayed in the toolbar

Run Sample

 

deleteRow (boolean)

Controls the appearance of the Delete record button in the toolbar

	<script>
	jQuery(document).ready( init )

	function init()
	{
		var dbnetedit1 = new DbNetEdit("dbnetedit1");
		with (dbnetedit1)
		{
			...
			deleteRow = true
			initialize()
		}
	}
	</script>

 

insertRow (boolean)

Controls the appearance of the Insert new record button in the toolbar

	<script>
	jQuery(document).ready( init )

	function init()
	{
		var dbnetedit1 = new DbNetEdit("dbnetedit1");
		with (dbnetedit1)
		{
			...
			insertRow = false
			initialize()
		}
	}
	</script>

 

navigation (boolean)

Controls the appearance of the Navigation buttons in the toolbar

	<script>
	jQuery(document).ready( init )

	function init()
	{
		var dbnetedit1 = new DbNetEdit("dbnetedit1");
		with (dbnetedit1)
		{
			...
			navigation = false
			initialize()
		}
	}
	</script>

 

quickSearch (boolean)

Adds a search box to the toolbar which can be used to search against all the columns that have been flagged as eligible for simpleSearch. By default this will be all the selected string columns.

	<script>
	jQuery(document).ready( init )

	function init()
	{
		var dbnetedit1 = new DbNetEdit("dbnetedit1");
		with (dbnetedit1)1)
		{
			...
			quickSearch = false
			initialize()
		}
	}
	</script>

Run Sample

 

search (boolean)

Controls the appearance of the Search dialog button in the toolbar

	<script>
	jQuery(document).ready( init )

	function init()
	{
		var dbnetedit1 = new DbNetEdit("dbnetedit1");
		with (dbnetedit1)
		{
			...
			search = false
			initialize()
		}
	}
	</script>

 

sort (boolean)

Enables/disables access to the the Column Sort Selection dialog from the toolbar

toolbarButtonStyle (string)

Sets the the style of the toolbar button. Choose from Image, Text or ImageAndText

Run Sample

toolbarLocation (string)

Sets the location/visibility of the toolbar. Values are Top (toolbar displayed above grid), Bottom (toolbar displayed below grid) or Hidden (toolbar is hidden)

	<script>
	jQuery(document).ready( init )

	function init()
	{
		var dbnetedit1 = new DbNetEdit("dbnetedit1");
		with (dbnetedit1)
		{
			...
			toolbarLocation="Hidden"
			initialize()
		}
	}
	</script>

 

userProfile (boolean)

Controls the User Profile  button in the toolbar

	<script>
	jQuery(document).ready( init )

	function init()
	{
		var dbnetedit1 = new DbNetEdit("dbnetedit1");
		with (dbnetedit1)
		{
			...
			userProfile = true
			initialize()
		}
	}
	</script>

 

userProfileSelect (boolean)

Controls the appearance of the User Profile selection list in the toolbar

	<script>
	jQuery(document).ready( init )

	function init()
	{
		var dbnetedit1 = new DbNetEdit("dbnetedit1");
		with (dbnetedit1)
		{
			...
			userProfile = true
			userProfileSelect = true
			initialize()
		}
	}
	</script>