.NET 學習

.NET 學習生活感想... 万事成蹉跎..... 贵在坚持 及时整理自己做过和学过的东西

博客园 首页 新随笔 联系 订阅 管理
<ext:ComboBox ID="cmbCategory" runat="server" TypeAhead="true" ForceSelection="true" DisplayField="NAME" ValueField="FIXCODE" MinChars="1"
                                                MatchFieldWidth="false" PageSize="10" FieldLabel="課程類別" LabelSeparator="" QueryMode="Default">
                                                <Store>
                                                    <ext:Store ID="Store2" runat="server" IsPagingStore="true" PageSize="10">
                                                        <Model>
                                                            <ext:Model ID="Model2" runat="server">
                                                                <Fields>
                                                                    <ext:ModelField Name="FIXCODE" />
                                                                    <ext:ModelField Name="NAME" />
                                                                    <ext:ModelField Name="ID" />
                                                                </Fields>
                                                            </ext:Model>
                                                        </Model>
                                                    </ext:Store>
                                                </Store>
                                                <ListConfig Width="320" Height="300" ItemSelector=".x-boundlist-item">
                                                    <Tpl ID="Tpl1" runat="server">
                                                        <Html>
                                                            <tpl for=".">
                                                           <tpl if="[xindex] == 1">
                                                           <table class="cbStates-list">
                                                           <tr>
                                                             <th>課程編碼</th>
                                                             <th>課程類別</th>
                                                          </tr>
                                                       </tpl>
                                                       <tr class="x-boundlist-item">
                                                        <td>{FIXCODE}</td>
                                                        <td>{NAME}</td>
                                                      </tr>
                                                      <tpl if="[xcount-xindex]==0">
                                                      </table>
                                                      </tpl>
                                                       </tpl>
                                                        </Html>
                                                    </Tpl>
                                                </ListConfig>
                                                <Triggers>
                                                    <ext:FieldTrigger Icon="Clear" Hidden="true" />
                                                </Triggers>
                                                <Listeners>
                                                    <BeforeQuery Handler="this.getTrigger(0)[this.getRawValue().toString().length == 0 ? 'hide' : 'show']();" />
                                                    <TriggerClick Handler="if (index == 0)
                                                         {
                                                            this.focus().clearValue();
                                                             trigger.hide();
                                                         }" />
                                                    <Select Handler="this.getTrigger(0).show();" />
                                                </Listeners>
                                                <DirectEvents>
                                                    <Select OnEvent="cmbCategory_SelectChange"></Select>
                                                </DirectEvents>
                                            </ext:ComboBox>

 

posted on 2019-09-17 11:04  Tonyyang  阅读(291)  评论(0编辑  收藏  举报
欢迎转载,转载请注明出处:http://www.cnblogs.com/Tonyyang/