类似ListView ,htc组件[1]

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

本文简介:选择自 lxx8402 的 blog

listview2_0_2.htc:
<public:component tagname="listview" lightweight=true>
<public:attach event="oncontentready" onevent="oncontentready()" />

<public:property name="width" />
<public:property name="height" />
<public:property name="dataxml" />
<public:property name="xmldoc" />
<public:property name="text" >
<public:property name="currentrow" />
<public:property name="selectedrowbackgroundcolour" value="steelblue" />
<public:property name="selectedrowcolour" value="white" />
<public:property name="lvdata" />
<public:property name="lvhead" />
<public:property name="toolbardisplay" value="" />
<public:property name="toolbar" />
<public:property name="table" />
<public:property name="listtable" />
<public:property name="displaytoolbar" value="true" />
<public:property name="toolbardisplay" value=""/>
<public:property name="wrapheadings" value="true" />
<public:property name="saveoptions" value="[['html','html'],['word','word'],['excel','excel'],['xml','xml']]"/>
<public:property name="smallbuttons" value="true">
<public:property name="pagesize" value="25"/>
<public:property name="pagenumber" value="1"/>
<public:property name="pagecount" value="0"/>
<public:property name="rowcount" value="0"/>
<public:property name="maxrowcount" value="100" />
<public:property name="search" value="false" id="searchid"/>
<public:property name="updaterow" value="false" id="updaterowid"/>
<public:property name="insertrow" value="false" id="insertrowid"/>
<public:property name="deleterow" value="false" id="deleterowid"/>
<public:property name="save" value="false" id="saveid"/>
<public:property name="print" value="false" id="printid"/>
<public:property name="copy" value="false" id="copyid"/>
<public:property name="help" value="false" id="helpid"/>
<public:property name="columnpicker" value="false" id="columnpickerid"/>
<public:property name="sort" value="false" id="sortid"/>
<public:property name="rowinfo" value="true" id="rowinfoid"/>
<public:property name="pageinfo" value="true" id="pageinfoid"/>
<public:property name="editrow" value="true" id="editrowid"/>
<public:property name="buttonnavigation" value="true" id="buttonnavigationid"/>
<public:property name="ordercolumn" value=""/>
<public:property name="lvformat" />
<public:property name="lvstyle" />

<public:method name="loadtext" />
<public:method name="loaddata" />
<public:method name="drawdata" />
<public:method name="selectrow" />
<public:method name="selectpage"/>
<public:method name="setrowstyle" />
<public:method name="configuretoolbar"/>
<public:method name="savegrid">
<public:method name="setcolumnproperty" />
<public:method name="reload" />
<public:method name="formatcolumnvalue" />

<public:event name="onrowselected" id="_lvevtrowselected"/>
<public:event name="onlistviewready" id="_lvevtlistviewready"/>
</public:component>

<script language="javascript">
//------------------------------------------------------------
// copyright (c) 2003-2004 leadinsoft. all rights reserved.
// version 2.0.1
// ahthor dolphin
// modify date 2004-1-5
//------------------------------------------------------------
var l_loading_text = "正在载入数据,请稍候...";
var l_abortcontrol_errormessage = "控件初始化出错,不能够载入";
var navbuttons = ["first","prev","next","last"];
var buttons = ['first','prev','next','last','search','updatebtn','insertbtn','deletebtn','save','copy','help','columnpicker','sort','print'];

//-------------------------------------------------------------

/**
 * 初始化listview
 *
 * xmldom实例
*/
function oncontentready(){
 element.innerhtml = "<span style='color:#8f8f8f'><b>"+ l_loading_text +"</b></span>";
 xmldoc = new activexobject("microsoft.xmldom");
 initialise();
}
/**
 * 初始化listview框架
 *
 * 建立listview表头
 * 初始化数据数组
 * 建立listview的工具栏和全局变量
*/
function initialise(){
 lvdata = new array();   //存放数据的数组
 lvhead = new array();   //存放表头的数组
 lvformat = new object();  //存放格式化数据对象
    lvstyle  = new array();   //存放过滤条件的数组对象
 text = new object();   //存放工具栏信息对象
 saveoptions = eval(saveoptions);
 maxrowcount = parseint(maxrowcount);
 
 //载入工具栏信息
 loadtext();
 
 //属性改变触发

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

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

go top