๋ฐ์ํ
๋ฐ์ดํฐ์ ๋์ ์์ฑ
- ์๋ ์์ค๋ Dataset์ ์์ฑํ๋ ๋๊ฐ์ง ์์ ๋ฅผ ๋ณด์ฌ์ค๋ค
- ์ฒซ๋ฒ์งธ๋ ๋น Dataset์ ์์ฑํ๊ณ ๋๋ฒ์งธ๋ ๋ฐ์ดํฐ์ ์ id์ ์ปฌ๋ผ, ๋ฐ์ดํฐ๋ฅผ ์ถ๊ฐํ๋ ์์
//Dataset Object ์์ฑ ์์ 1
this.dataset_test1 = new Dataset();
trace("\n" + this.dataset_test1.saveXML());
//Dataset Object ์์ฑ ์์ 2 (id ํฌํจ)
this.dataset_test2 = new Dataset("dataset_test2");
//์ปฌ๋ผ ์ถ๊ฐ
this.dataset_test2.addColumn("col1");
this.dataset_test2.addColumn("col2");
//๋ฐ์ดํฐ ์ถ๊ฐ
var currentRow = this.dataset_test2.addRow();
this.dataset_test2.setColumn(currentRow, "col1", "data1");
this.dataset_test2.setColumn(currentRow, "col2", "data2");
trace("\n" + this.dataset_test2.saveXML());
https://6developer.com/961#google_vignette
๋ฅ์ฌํฌ๋ก findRow๋ก ํน์ ํ ์ฐพ๊ธฐ
this.dsSearch.findRow("NAME", "JY"));
https://flatsun.tistory.com/465
๋ฅ์ฌํฌ๋ก ๋ง์ด ์ฐ๋ ๋ฌธ๋ฒ ์ ๋ฆฌ
<div class="colorscripter-code" style="color:#010101;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important;overflow:auto"><table class="colorscripter-code-table" style="margin:0;padding:0;border:none;background-color:#fafafa;border-radius:4px;" cellspacing="0" cellpadding="0"><tr><td style="padding:6px;border-right:2px solid #e5e5e5"><div style="margin:0;padding:0;word-break:normal;text-align:right;color:#666;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%"><div style="line-height:130%">1</div><div style="line-height:130%">2</div><div style="line-height:130%">3</div><div style="line-height:130%">4</div><div style="line-height:130%">5</div><div style="line-height:130%">6</div><div style="line-height:130%">7</div><div style="line-height:130%">8</div><div style="line-height:130%">9</div><div style="line-height:130%">10</div><div style="line-height:130%">11</div><div style="line-height:130%">12</div><div style="line-height:130%">13</div><div style="line-height:130%">14</div><div style="line-height:130%">15</div><div style="line-height:130%">16</div><div style="line-height:130%">17</div><div style="line-height:130%">18</div><div style="line-height:130%">19</div><div style="line-height:130%">20</div><div style="line-height:130%">21</div><div style="line-height:130%">22</div><div style="line-height:130%">23</div><div style="line-height:130%">24</div><div style="line-height:130%">25</div><div style="line-height:130%">26</div><div style="line-height:130%">27</div><div style="line-height:130%">28</div><div style="line-height:130%">29</div><div style="line-height:130%">30</div><div style="line-height:130%">31</div><div style="line-height:130%">32</div><div style="line-height:130%">33</div><div style="line-height:130%">34</div><div style="line-height:130%">35</div><div style="line-height:130%">36</div><div style="line-height:130%">37</div><div style="line-height:130%">38</div><div style="line-height:130%">39</div><div style="line-height:130%">40</div><div style="line-height:130%">41</div><div style="line-height:130%">42</div><div style="line-height:130%">43</div><div style="line-height:130%">44</div><div style="line-height:130%">45</div><div style="line-height:130%">46</div><div style="line-height:130%">47</div><div style="line-height:130%">48</div><div style="line-height:130%">49</div><div style="line-height:130%">50</div><div style="line-height:130%">51</div><div style="line-height:130%">52</div><div style="line-height:130%">53</div><div style="line-height:130%">54</div><div style="line-height:130%">55</div><div style="line-height:130%">56</div><div style="line-height:130%">57</div><div style="line-height:130%">58</div><div style="line-height:130%">59</div><div style="line-height:130%">60</div><div style="line-height:130%">61</div><div style="line-height:130%">62</div><div style="line-height:130%">63</div><div style="line-height:130%">64</div><div style="line-height:130%">65</div><div style="line-height:130%">66</div><div style="line-height:130%">67</div><div style="line-height:130%">68</div><div style="line-height:130%">69</div><div style="line-height:130%">70</div><div style="line-height:130%">71</div><div style="line-height:130%">72</div><div style="line-height:130%">73</div><div style="line-height:130%">74</div><div style="line-height:130%">75</div><div style="line-height:130%">76</div><div style="line-height:130%">77</div><div style="line-height:130%">78</div><div style="line-height:130%">79</div><div style="line-height:130%">80</div><div style="line-height:130%">81</div><div style="line-height:130%">82</div><div style="line-height:130%">83</div><div style="line-height:130%">84</div><div style="line-height:130%">85</div><div style="line-height:130%">86</div><div style="line-height:130%">87</div><div style="line-height:130%">88</div><div style="line-height:130%">89</div><div style="line-height:130%">90</div><div style="line-height:130%">91</div><div style="line-height:130%">92</div><div style="line-height:130%">93</div><div style="line-height:130%">94</div><div style="line-height:130%">95</div><div style="line-height:130%">96</div><div style="line-height:130%">97</div><div style="line-height:130%">98</div><div style="line-height:130%">99</div><div style="line-height:130%">100</div><div style="line-height:130%">101</div><div style="line-height:130%">102</div><div style="line-height:130%">103</div><div style="line-height:130%">104</div><div style="line-height:130%">105</div><div style="line-height:130%">106</div><div style="line-height:130%">107</div><div style="line-height:130%">108</div><div style="line-height:130%">109</div><div style="line-height:130%">110</div><div style="line-height:130%">111</div><div style="line-height:130%">112</div><div style="line-height:130%">113</div><div style="line-height:130%">114</div><div style="line-height:130%">115</div><div style="line-height:130%">116</div><div style="line-height:130%">117</div><div style="line-height:130%">118</div><div style="line-height:130%">119</div><div style="line-height:130%">120</div><div style="line-height:130%">121</div><div style="line-height:130%">122</div><div style="line-height:130%">123</div><div style="line-height:130%">124</div><div style="line-height:130%">125</div><div style="line-height:130%">126</div><div style="line-height:130%">127</div><div style="line-height:130%">128</div><div style="line-height:130%">129</div><div style="line-height:130%">130</div><div style="line-height:130%">131</div><div style="line-height:130%">132</div><div style="line-height:130%">133</div><div style="line-height:130%">134</div><div style="line-height:130%">135</div><div style="line-height:130%">136</div><div style="line-height:130%">137</div><div style="line-height:130%">138</div><div style="line-height:130%">139</div><div style="line-height:130%">140</div><div style="line-height:130%">141</div><div style="line-height:130%">142</div><div style="line-height:130%">143</div><div style="line-height:130%">144</div><div style="line-height:130%">145</div><div style="line-height:130%">146</div><div style="line-height:130%">147</div><div style="line-height:130%">148</div><div style="line-height:130%">149</div><div style="line-height:130%">150</div><div style="line-height:130%">151</div><div style="line-height:130%">152</div><div style="line-height:130%">153</div><div style="line-height:130%">154</div></div></td><td style="padding:6px 0;text-align:left"><div style="margin:0;padding:0;color:#010101;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%"><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
์ด๊ธฐํ (์ปฌ๋ผ์ ๋ณด๊น์ง)</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_1_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.ds_list.clear();</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#a71d5d">trace</span>(<span style="color:#066de2">this</span>.ds_list.saveXML());</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
์ด๊ธฐํ (๋ฐ์ดํฐ๋ง)</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_2_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.ds_list.clearData();</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#a71d5d">trace</span>(<span style="color:#066de2">this</span>.ds_list.saveXML());</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
์ ํ์ถ๊ฐ</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_3_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#a71d5d">var</span> iAddRow <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#066de2">this</span>.ds_list.addRow();</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#a71d5d">trace</span>(<span style="color:#63a35c">"์ถ๊ฐ๋ ํ๋ฒํธ == "</span> <span style="color:#ff3399"></span><span style="color:#a71d5d">+</span> iAddRow);</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
์ ํ์ฝ์
</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_4_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.ds_list.insertRow(<span style="color:#0099cc">1</span>);</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
์ ํ์ญ์ </span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_5_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.ds_list.deleteRow(<span style="color:#0099cc">1</span>);</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
์ ์ปฌ๋ผ์ถ๊ฐ</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_6_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.ds_list.addColumn(<span style="color:#63a35c">"Column5"</span>, <span style="color:#63a35c">"string"</span>);</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#a71d5d">trace</span>(<span style="color:#066de2">this</span>.ds_list.saveXML());</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
์ ์ปฌ๋ผ์ญ์ </span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_7_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.ds_list.set_updatecontrol(<span style="color:#0099cc">false</span>);<span style="color:#999999">//updatecontrol ์์ฑ์ด false์ผ๋๋ง ์ปฌ๋ผ์ด ์ญ์ ๋จ</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.ds_list.deleteColumn(<span style="color:#63a35c">"Column1"</span>);</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.ds_list.set_updatecontrol(<span style="color:#a71d5d">true</span>);</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#a71d5d">trace</span>(<span style="color:#066de2">this</span>.ds_list.saveXML());</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
์ ์ปฌ๋ผ์ ๊ฐ ์
๋ ฅ</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_8_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.ds_list.setColumn(<span style="color:#0099cc">0</span>, <span style="color:#63a35c">"Column3"</span>, <span style="color:#63a35c">"ํ
์คํธ ์
๋ ฅ"</span>);</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
์ปฌ๋ผ์ ๊ฐ ์ฝ๊ธฐ</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_9_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//alert(e.co);</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#a71d5d">var</span> sReadValue <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#066de2">this</span>.ds_list.getColumn(<span style="color:#066de2">this</span>.ds_list.rowposition, <span style="color:#63a35c">"Column1"</span>);</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">alert</span>(<span style="color:#63a35c">"2๋ฒ์งธ Row, Column1 ์ปฌ๋ผ๊ฐ = "</span> <span style="color:#ff3399"></span><span style="color:#a71d5d">+</span> sReadValue);</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
๋ณต์ฌ</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_10_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.ds_copyList.copyData(<span style="color:#066de2">this</span>.ds_list, <span style="color:#a71d5d">true</span>);</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
์ด๊ฑด์</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_11_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">// ๊ฐ์๋ฅผ ๊ตฌํ ๋ ํํฐ๋ง๋๊ฑฐ๋ ์ญ์ ๋ ํ์ ์ ์ธ๋ฉ๋๋ค.</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">alert</span>(<span style="color:#63a35c">"ds_list ๋ฐ์ดํฐ์
Row ์ด๊ฑด์ == "</span> <span style="color:#ff3399"></span><span style="color:#a71d5d">+</span> <span style="color:#066de2">this</span>.ds_list.getRowCount());</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
ํํฐ</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_12_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.ds_list.filter(<span style="color:#63a35c">""</span>);<span style="color:#999999">//ํํฐ ์ด๊ธฐํ</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.ds_list.filter(<span style="color:#63a35c">"Column4=='1'"</span>);</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
์์ ํน์ ๊ฐ ์์น ์ฐพ๊ธฐ</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_13_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#a71d5d">var</span> iFindRow <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#066de2">this</span>.ds_list.findRow(<span style="color:#63a35c">"Column0"</span>, <span style="color:#63a35c">"3"</span>);</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">alert</span>(<span style="color:#63a35c">"์ปฌ๋ผ Column0์ ๊ฐ์ด 3์ธ Row ์์น == "</span> <span style="color:#ff3399"></span><span style="color:#a71d5d">+</span> iFindRow);</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
์ ํ์ฌ Row ์์น</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_14_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">alert</span>(<span style="color:#066de2">this</span>.ds_list.rowposition);</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
์ ํน์ ๊ฐ ์นด์ดํธ</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_15_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">alert</span>(<span style="color:#63a35c">"์ปฌ๋ผ Column4์ ๊ฐ์ด '1'์ธ Row์ == "</span> <span style="color:#ff3399"></span><span style="color:#a71d5d">+</span> <span style="color:#066de2">this</span>.ds_list.getCaseCount(<span style="color:#63a35c">"Column4=='1'"</span>));</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
์ ํน์ Row๋ก ์ด๋</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_16_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.ds_list.set_rowposition(<span style="color:#0099cc">1</span>);</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
์ Append</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_17_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//ํ์ฌ ๋ฐ์ดํฐ์
์ ๋ง์ง๋ง ๋ ์ฝ๋ ๋ค์์ ์ง์ ํ ๋ฐ์ดํฐ์
์ ๋ ์ฝ๋๋ฅผ ์ถ๊ฐํ๋ ๋ฉ์๋์
๋๋ค.</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.ds_list.appendData(<span style="color:#066de2">this</span>.ds_appendList);</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
CopyRow</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_18_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">// ํน์ ๋ฐ์ดํฐ์
์ ํ(row)์ ํ์ฌ ๋ฐ์ดํฐ์
์ ์ง์ ํ ํ์ ์์น์ ๋ณต์ฌํ๋ ๋ฉ์๋์
๋๋ค.</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.ds_list.copyRow(<span style="color:#0099cc">1</span>, <span style="color:#066de2">this</span>.ds_appendList, <span style="color:#0099cc">0</span>);</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
ํฉ๊ณ</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_19_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//getAvg, getMax, getMin, getCaseSum, getCaseMax, getCaseMin, getCaseAvg ์ฌ์ฉ๊ฐ๋ฅ</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">alert</span>(<span style="color:#066de2">this</span>.ds_list.getSum(<span style="color:#63a35c">"Column3"</span>));</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
lookup</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_20_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
์ ๋์ ์ด(column)์์ ์กฐ๊ฑด๊ณผ ์ผ์นํ๋ ๊ฐ์ ๊ฒ์ ํ ํด๋น ํ(row)์ ์ง์ ๋ ์ด ๊ฐ์ ๊ตฌํ๋ ๋ฉ์๋์
๋๋ค.</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">alert</span>(<span style="color:#066de2">this</span>.ds_list.lookup(<span style="color:#63a35c">"Column0"</span>, <span style="color:#63a35c">"2"</span>, <span style="color:#63a35c">"Column2"</span>));</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//๋ฐ์ดํฐ์
์ ๋ ฌ</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.btn_21_onclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Button, e:nexacro.ClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.ds_list.set_keystring(<span style="color:#63a35c">"S:-Column3"</span>);</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">this</span>.Grid00_oncellclick <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#a71d5d">function</span>(obj:Grid, e:nexacro.GridClickEventInfo)</div><div style="padding:0 6px; white-space:pre; line-height:130%">{</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">//alert(e.col + " " + e.row);</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#999999">// alert(this.ds_list.getColID(e.col));</span></div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"> </div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#a71d5d">var</span> sReadValue <span style="color:#ff3399"></span><span style="color:#a71d5d">=</span> <span style="color:#066de2">this</span>.ds_list.getColumn(e.row, <span style="color:#066de2">this</span>.ds_list.getColID(e.col));</div><div style="padding:0 6px; white-space:pre; line-height:130%"><span style="color:#066de2">alert</span>(sReadValue);</div><div style="padding:0 6px; white-space:pre; line-height:130%">}</div></div><div style="text-align:right;margin-top:-13px;margin-right:5px;font-size:9px;font-style:italic"><a href="http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter</a></div></td><td style="vertical-align:bottom;padding:0 2px 4px 0"><a href="http://colorscripter.com/info#e" target="_blank" style="text-decoration:none;color:white"><span style="font-size:9px;word-break:normal;background-color:#e5e5e5;color:white;border-radius:10px;padding:1px">cs</span></a></td></tr></table></div>
//๋ฐ์ดํฐ์
์ด๊ธฐํ (์ปฌ๋ผ์ ๋ณด๊น์ง)
this.btn_1_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
this.ds_list.clear();
trace(this.ds_list.saveXML());
}
//๋ฐ์ดํฐ์
์ด๊ธฐํ (๋ฐ์ดํฐ๋ง)
this.btn_2_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
this.ds_list.clearData();
trace(this.ds_list.saveXML());
}
//๋ฐ์ดํฐ์
์ ํ์ถ๊ฐ
this.btn_3_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
var iAddRow = this.ds_list.addRow();
trace("์ถ๊ฐ๋ ํ๋ฒํธ == " + iAddRow);
}
//๋ฐ์ดํฐ์
์ ํ์ฝ์
this.btn_4_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
this.ds_list.insertRow(1);
}
//๋ฐ์ดํฐ์
์ ํ์ญ์
this.btn_5_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
this.ds_list.deleteRow(1);
}
//๋ฐ์ดํฐ์
์ ์ปฌ๋ผ์ถ๊ฐ
this.btn_6_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
this.ds_list.addColumn("Column5", "string");
trace(this.ds_list.saveXML());
}
//๋ฐ์ดํฐ์
์ ์ปฌ๋ผ์ญ์
this.btn_7_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
this.ds_list.set_updatecontrol(false);//updatecontrol ์์ฑ์ด false์ผ๋๋ง ์ปฌ๋ผ์ด ์ญ์ ๋จ
this.ds_list.deleteColumn("Column1");
this.ds_list.set_updatecontrol(true);
trace(this.ds_list.saveXML());
}
//๋ฐ์ดํฐ์
์ ์ปฌ๋ผ์ ๊ฐ ์
๋ ฅ
this.btn_8_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
this.ds_list.setColumn(0, "Column3", "ํ
์คํธ ์
๋ ฅ");
}
//๋ฐ์ดํฐ์
์ปฌ๋ผ์ ๊ฐ ์ฝ๊ธฐ
this.btn_9_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
//alert(e.co);
var sReadValue = this.ds_list.getColumn(this.ds_list.rowposition, "Column1");
alert("2๋ฒ์งธ Row, Column1 ์ปฌ๋ผ๊ฐ = " + sReadValue);
}
//๋ฐ์ดํฐ์
๋ณต์ฌ
this.btn_10_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
this.ds_copyList.copyData(this.ds_list, true);
}
//๋ฐ์ดํฐ์
์ด๊ฑด์
this.btn_11_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
// ๊ฐ์๋ฅผ ๊ตฌํ ๋ ํํฐ๋ง๋๊ฑฐ๋ ์ญ์ ๋ ํ์ ์ ์ธ๋ฉ๋๋ค.
alert("ds_list ๋ฐ์ดํฐ์
Row ์ด๊ฑด์ == " + this.ds_list.getRowCount());
}
//๋ฐ์ดํฐ์
ํํฐ
this.btn_12_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
this.ds_list.filter("");//ํํฐ ์ด๊ธฐํ
this.ds_list.filter("Column4=='1'");
}
//๋ฐ์ดํฐ์
์์ ํน์ ๊ฐ ์์น ์ฐพ๊ธฐ
this.btn_13_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
var iFindRow = this.ds_list.findRow("Column0", "3");
alert("์ปฌ๋ผ Column0์ ๊ฐ์ด 3์ธ Row ์์น == " + iFindRow);
}
//๋ฐ์ดํฐ์
์ ํ์ฌ Row ์์น
this.btn_14_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
alert(this.ds_list.rowposition);
}
//๋ฐ์ดํฐ์
์ ํน์ ๊ฐ ์นด์ดํธ
this.btn_15_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
alert("์ปฌ๋ผ Column4์ ๊ฐ์ด '1'์ธ Row์ == " + this.ds_list.getCaseCount("Column4=='1'"));
}
//๋ฐ์ดํฐ์
์ ํน์ Row๋ก ์ด๋
this.btn_16_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
this.ds_list.set_rowposition(1);
}
//๋ฐ์ดํฐ์
์ Append
this.btn_17_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
//ํ์ฌ ๋ฐ์ดํฐ์
์ ๋ง์ง๋ง ๋ ์ฝ๋ ๋ค์์ ์ง์ ํ ๋ฐ์ดํฐ์
์ ๋ ์ฝ๋๋ฅผ ์ถ๊ฐํ๋ ๋ฉ์๋์
๋๋ค.
this.ds_list.appendData(this.ds_appendList);
}
//๋ฐ์ดํฐ์
CopyRow
this.btn_18_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
// ํน์ ๋ฐ์ดํฐ์
์ ํ(row)์ ํ์ฌ ๋ฐ์ดํฐ์
์ ์ง์ ํ ํ์ ์์น์ ๋ณต์ฌํ๋ ๋ฉ์๋์
๋๋ค.
this.ds_list.copyRow(1, this.ds_appendList, 0);
}
//๋ฐ์ดํฐ์
ํฉ๊ณ
this.btn_19_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
//getAvg, getMax, getMin, getCaseSum, getCaseMax, getCaseMin, getCaseAvg ์ฌ์ฉ๊ฐ๋ฅ
alert(this.ds_list.getSum("Column3"));
}
//๋ฐ์ดํฐ์
lookup
this.btn_20_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
//๋ฐ์ดํฐ์
์ ๋์ ์ด(column)์์ ์กฐ๊ฑด๊ณผ ์ผ์นํ๋ ๊ฐ์ ๊ฒ์ ํ ํด๋น ํ(row)์ ์ง์ ๋ ์ด ๊ฐ์ ๊ตฌํ๋ ๋ฉ์๋์
๋๋ค.
alert(this.ds_list.lookup("Column0", "2", "Column2"));
}
//๋ฐ์ดํฐ์
์ ๋ ฌ
this.btn_21_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
this.ds_list.set_keystring("S:-Column3");
}
this.Grid00_oncellclick = function(obj:Grid, e:nexacro.GridClickEventInfo)
{
//alert(e.col + " " + e.row);
// alert(this.ds_list.getColID(e.col));
var sReadValue = this.ds_list.getColumn(e.row, this.ds_list.getColID(e.col));
alert(sReadValue);
}
https://joshart777.tistory.com/78
- ๋ฐ์ดํฐ์ ์์ row ์์ฑ (๋งจ์๋ row ๋ก ์์ฑ)
var row = this.ds.addRow();
- ๋ฐ์ดํฐ์ ์์ row ์์ฑ (๋งจ์์ row ๋ก ์์ฑ)
var row = this.ds.insertRow();
- ๋ฐ์ดํฐ์ ์์ row ์ญ์
this.ds.deleteRow(this.ds.rowposition);
this.ds.deleteRow(rowIndex);
- ๋ฐ์ดํฐ์ ์์ ์ปฌ๋ผ ๊ฐ์ ธ์ค๊ธฐ
this.ds.getColumn(rowIndex, "columnName");
- ๋ฐ์ดํฐ์ ์์ ํน์ ์ปฌ๋ผ ์ธํ ํ๊ธฐ
this.ds.setColumn(row, "columnName", value);
- ๋ฐ์ดํฐ์ ์์ ์ปฌ๋ผ์ ๋ณด ๊ฐ์ ธ์ค๊ธฐ
this.ds.getColumnInfo(columnIndex);
- ๋ฐ์ดํฐ์ ์ ๊ฐ์ด ์๋์ง rowcount ๋ก ํ์ธํ๋ ๋ฐฉ๋ฒ
this.ds.rowcount == 0
//if(this.ds.rowcount > 0) {
// trace("๋ฐ์ดํฐ๊ฐ ์๋ค!")
//};
- ๊ฐ์ด ํฌํจ๋ row ์ฐพ๊ธฐ (rowIndex ๋ฐํ, ๋ชป์ฐพ์ ๊ฒฝ์ฐ -1 ๋ฐํ)
this.ds.findRow("columnName",value);
- ์ด๋ฒคํธ๋ฅผ ์ ์ ์ค์งํจ
this.ds.set_enableevent(false);
https://devinserengeti.tistory.com/44
๋ฐ์ํ
'Web' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
๋ฅ์ฌํฌ๋ก ๋จ์ถํค (0) | 2023.12.01 |
---|---|
๋ฅ์ฌํฌ๋ก ๊ทธ๋ฆฌ๋ (0) | 2023.11.21 |
[Laravel] laravel/fortify (0) | 2020.12.20 |
Laravel ์ค์น (Windows, WSL 2 - Ubuntu) (0) | 2020.12.20 |
[nginx] ๊ธฐ๋ณธ ์ฐ๊ฒฐ https๋ก ์ค์ (0) | 2020.10.09 |