|
Client API Reference |
Top Previous Next |
|
The simplest form can be created by specifying just the connectionString and fromPart properties 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. 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>
Enables/disables the advanced search dialog Reference to the Advanced Search Dialog object 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.
Auditing can also be implemented at the column level if changes to a specific column need to be tracked. Controls the format of the last modified date displayed when auditing is enabled. 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. Specifies the height of the browse dialog Specifies the width of the browse dialog 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>
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 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>
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>
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>
If set to true the edit form will automatically enter insert mode when initialized and remain so after a record is inserted. Defines the number of columns over which the generated DbNetEdit layout is distributed (defaults to 1)
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>
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. Used in combination with the parentFilterSql parameter to supply parameter values. Primary key value(s) for the current record 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>
Reference to the Standard Search Dialog object 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>
Specifies the default search mode. Can be set to either Simple, Standard or Advanced 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
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>
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>
Displayable descriptive text version of the search dialog criteria . Specifies the number of columns over which the search criteria are distributed Specifies if only the search values are selectable in the search dialog/panel 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) Enables/disables the simple search dialog Reference to the Simple Search Dialog object 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. Enables/disables the standard search dialog The total number of rows selected
The following properties control the buttons and information displayed in the toolbar
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>
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>
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>
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>
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>
Enables/disables access to the the Column Sort Selection dialog from the toolbar Sets the the style of the toolbar button. Choose from Image, Text or ImageAndText 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>
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>
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>
|