类似ListView ,htc组件[7]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 lxx8402 的 blog

 <deletetitle>删除选择记录</deletetitle>
 <savetitle>保存grid (格式:html, word or excel)</savetitle>
 <copytitle>拷贝grid到剪贴板</copytitle>
 <helptitle>显示listview帮助</helptitle>
 <columnpickertitle>选择grid列</columnpickertitle>
 <clipboardcopy>拷贝grid数据到剪贴板</clipboardcopy>
 <sorttitle>增加排序字段</sorttitle>
 <printtitle>打印grid数据</printtitle>
 <viewtitle>显示选择记录</viewtitle>

<!-- text -->
 <searchtext>搜索</searchtext>
 <updatetext>更新</updatetext>
 <firsttext>首页</firsttext>
 <prevtext>上一页</prevtext>
 <nexttext>下一页</nexttext>
 <lasttext>尾页</lasttext>
 <inserttext>插入</inserttext>
 <deletetext>删除</deletetext>
 <savetext>保存</savetext>
 <copytext>拷贝</copytext>
 <helptext>帮助</helptext>
 <columnpickertext>所有列</columnpickertext>
 <sorttext>排序</sorttext>
 <printtext>打印</printtext>
 <viewtext><![cdata[<u>v</u>iew]]></viewtext>

 <page>页</page>
 <of>共</of>
 <rows>行</rows>
<!-- alarm -->
 <maxrowcount>数据大于允许的最大数目,自动截断!</maxrowcount>
</lvlang>
testlistview2_0_2.htm:
<html xmlns:mylist>
<?import namespace="mylist" implementation="listview2_0_2.htc"/>
<head>
<title> test listview </title>
<style>
table.lvtoolbar {font-family:tahoma;font-size:8pt;}
select.lv {font-family:tahoma;font-size:8pt;border:1pt solid dimgray}
input.lv {font-family:tahoma;font-size:8pt;border:1pt solid dimgray;text-align:right}
tr.lvheading {background-color:gainsboro;cursor:hand}
td.lvheading {padding:0px}
table.lvheading {font-family:tahoma;font-size:8pt;height:100%;width:100%;border:1pt outset;padding:0px;}
table.lv {font-family:tahoma;font-size:8pt;border-color:dimgray;border-collapse:collapse;}
.head{
 background-color: #dfdfdf;
 border-left:solid #ffffff 1.5px;
 border-top:solid #ffffff 1.5px;
 border-right:solid #808080 1.8px;
 border-bottom:solid #808080 1.8px;
 padding-left: 1px;
 padding-top: 3px;
 padding-bottom: 1px;
 text-align:left;
 font-size: 12px;
 cursor:hand;
}

td{
 font-size: 12px;
}
</style>
<script language="javascript">
<!--
function clickrow(){
 //return;
}

var alarmlevel = new array(4);
alarmlevel[0] = new array("1","正常日志");
alarmlevel[1] = new array("2","一般告警");
alarmlevel[2] = new array("3","次要告警");
alarmlevel[3] = new array("4","严重告警");

var alarmflag = new array(2);
alarmflag[0] = new array("false","&nbsp;");
alarmflag[1] = new array("true","<img src='images/check.png'>");

function initialize(){
 olist.setcolumnproperty('severity','backgroundcolor:red;color:#000000;cursor:default','4',true);
  olist.setcolumnproperty('severity','backgroundcolor:yellow;color:#000000;cursor:default','3',true);
 olist.setcolumnproperty('severity','backgroundcolor:#efd887;color:#000000;cursor:default','2',true);
  olist.setcolumnproperty('severity','backgroundcolor:#f9efd0;color:#000000;cursor:default','1',true);
 olist.formatcolumnvalue('severity',alarmlevel);
 olist.formatcolumnvalue('acknowledged',alarmflag);
 olist.maxrowcount = "50";
 olist.pagesize = "20";
 olist.drawdata();
}
function test2(){
 olist.selectedrowbackgroundcolour = "#0000a0";
}
function adddata(){

本文关键:javascript datagrid htc listview
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top