Jun 05, 2013, 6:04 AM
[CLOSED] I Write code in accordance with Example ,reported Uncaught TypeError: Cannot call method 'call' of undefined
I write code accordance with Example
<ext:ComboBox ID="ItemClassCode" runat="Server" FieldLabel="项目类别"
EmptyText="选择项目分类"
TypeAhead="true"
Editable="false"
ForceSelection="true"
DisplayField="ItemClassName"
ValueField="ItemClassCode"
MinChars="1"
MatchFieldWidth="false"
PageSize="10">
<Store>
<ext:Store ID="Store4" runat="server" IsPagingStore="true" PageSize="10">
<Model>
<ext:Model ID="Model4" runat="server">
<Fields>
<ext:ModelField Name="ItemClassCode" />
<ext:ModelField Name="ItemClassName" />
<ext:ModelField Name="CodeScheme" />
<ext:ModelField Name="Memo" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ListConfig Width="340" Height="300" ItemSelector=".x-boundlist-item">
<Tpl ID="Tpl2" runat="server">
<Html>
<tpl for=".">
<tpl if="[xindex] == 1">
<table class="cbStates-list">
<tr>
<th>项目分类编码</th>
<th>项目分类名称</th>
<th>编码方案</th>
<th>备注</th>
</tr>
</tpl>
<tr class="x-boundlist-item">
<td>{ItemClassCode}</td>
<td>{ItemClassName}</td>
<td>{CodeScheme}</td>
<td>{Memo}</td>
</tr>
<tpl if="[xcount-xindex]==0">
</table>
</tpl>
</tpl>
</Html>
</Tpl>
</ListConfig>
<Triggers>
<ext:FieldTrigger Icon="Clear" HideTrigger="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>
</ext:ComboBox>
Store store4 = this.ItemClassCode.GetStore();
store4.DataSource = new ItemClassService().getAllItemClass();
Store4.DataBind();
Last edited by Daniil; Jun 11, 2013 at 4:27 AM.
Reason: [CLOSED]