<script language=JScript>
//////////////////////////////////////////////////////////////////////////////////////////////
function initialise()
//////////////////////////////////////////////////////////////////////////////////////////////
{
with (document.all.dbnetgrid1)
{
//设置链接数据库
connectionString = "samples"
//设置显示的标题
headings = ["Customer Code","Customer Name","Address","City","Region","Phone","Fax"]
//设置显示字段
selectPart = ["customerid","companyname","address","city","region","phone","fax"]
//设置源表
fromPart = "customers"
orderColumn = "region"
orderSequence = "desc"
copyType = "enhanced"
printType = "enhanced"
//设置颜色,支持正则表达
setColumnProperty('city','backgroundColor:#C8C8FF')
setColumnProperty('region','backgroundColor:gold',/SP/,false)
setColumnProperty('region','backgroundColor:yellow',/WY/,true)
setColumnProperty('region','backgroundColor:darkorange',/WA/,false)
saveType = "enhanced"
view = true
primaryKeyColumn = 'customerid'
//设置是否可编辑
editRow = true loadData()
}
}</script>