blob: 041c0e6601379558eab358c147fd9d358e82f5db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>For demo purpose only :: &1</title>
<script src="../dhtmlx/dhtmlx.js" type="text/javascript" charset="utf-8"></script>
<script src="../dhtmlx/dhtmlxdataprocessor.js" type="text/javascript" charset="utf-8"></script>
<script src="../../codebase/connector.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="../dhtmlx/dhtmlx.css" type="text/css" charset="utf-8">
</head>
<body>
<div id="gridbox" width="350px" height="550px" style="background-color:white;overflow:hidden"></div>
<script>
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath("../dhtmlx/imgs/");
mygrid.setHeader("Column A, Column B");
mygrid.attachHeader("#connector_text_filter,#connector_text_filter")
mygrid.setInitWidths("100,*")
mygrid.setColTypes("edtxt,ed");
mygrid.setColSorting("connector,connector")
mygrid.enableSmartRendering(true)
mygrid.enableMultiselect(true)
mygrid.init();
mygrid.loadXML("xx_adodb.php");
var dp = new dataProcessor("xx_adodb.php");
dp.init(mygrid);
</script>
<input type="button" name="add" value="add row" onclick="var id=mygrid.uid(); mygrid.addRow(id,'',0); mygrid.showRow(id);">
<input type="button" name="delete" value="delete row" onclick="mygrid.deleteSelectedRows()">
<div class='code'><code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br /> </span><span style="color: #007700">require_once(</span><span style="color: #DD0000">"../config.php"</span><span style="color: #007700">);
<br /> </span><span style="color: #0000BB">$res</span><span style="color: #007700">=</span><span style="color: #0000BB">mysql_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_server</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_user</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_pass</span><span style="color: #007700">);
<br /> </span><span style="color: #0000BB">mysql_select_db</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_db</span><span style="color: #007700">);
<br />
<br /> require(</span><span style="color: #DD0000">"../../codebase/grid_connector.php"</span><span style="color: #007700">);
<br /> </span><span style="color: #0000BB">$grid </span><span style="color: #007700">= new </span><span style="color: #0000BB">GridConnector</span><span style="color: #007700">(</span><span style="color: #0000BB">$res</span><span style="color: #007700">);
<br /> </span><span style="color: #0000BB">$grid</span><span style="color: #007700">-></span><span style="color: #0000BB">enable_log</span><span style="color: #007700">(</span><span style="color: #DD0000">"temp.log"</span><span style="color: #007700">,</span><span style="color: #0000BB">true</span><span style="color: #007700">);
<br /> </span><span style="color: #0000BB">$grid</span><span style="color: #007700">-></span><span style="color: #0000BB">dynamic_loading</span><span style="color: #007700">(</span><span style="color: #0000BB">100</span><span style="color: #007700">);
<br /> </span><span style="color: #0000BB">$grid</span><span style="color: #007700">-></span><span style="color: #0000BB">render_table</span><span style="color: #007700">(</span><span style="color: #DD0000">"grid50000"</span><span style="color: #007700">,</span><span style="color: #DD0000">"item_id"</span><span style="color: #007700">,</span><span style="color: #DD0000">"item_nm,item_cd"</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">?></span>
</span>
</code></div></body>
</html>
|