Dec 03, 2010, 1:36 PM
[CLOSED] user control in anchor
Hello,
I would like to create a custom user control containing a store and a combobox:
the problem is I am getting this error:
I would like to create a custom user control containing a store and a combobox:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ComboBoxHeading.ascx.cs" Inherits="Truvo.Web.KWI.Controls.ComboBoxHeading" %>
<asp:ObjectDataSource ID="HeadingDataSource" runat="server" SelectMethod="StartsWith" TypeName="Truvo.Web.KWI.DB.Heading"
OnSelected="HeadingDataSource_Selected">
<SelectParameters>
<asp:Parameter Name="Start" Type="Int32" DefaultValue="0" />
<asp:Parameter Name="Limit" Type="Int32" DefaultValue="15" />
<asp:Parameter Name="SortField" />
<asp:Parameter Name="SortDir" />
<asp:Parameter Name="InputString" Type="String" />
<asp:Parameter Name="Count" Direction="Output" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<ext:Store ID="HeadingStore" runat="server" AutoLoad="true" RemoteSort="true" DataSourceID="HeadingDataSource" ShowWarningOnFailure="true"
OnRefreshData="HeadingStore_RefreshData">
<AjaxEventConfig IsUpload="true" />
<Proxy>
<ext:DataSourceProxy />
</Proxy>
<Reader>
<ext:JsonReader ReaderID="RowNumber">
<Fields>
<ext:RecordField Name="Code" />
<ext:RecordField Name="Name" />
<ext:RecordField Name="Locale" />
<ext:RecordField Name="NameString" />
<ext:RecordField Name="LocaleString" />
</Fields>
</ext:JsonReader>
</Reader>
<BaseParams>
<ext:Parameter Name="InputString" Value="#{cbHeading}.getValue();" Mode="Raw" />
</BaseParams>
</ext:Store>
<ext:ComboBox ID="cbHeading" runat="server" StoreID="HeadingStore" DisplayField="Name" ValueField="Code"
TypeAhead="false" LoadingText="Searching..." Width="200" PageSize="15" HideTrigger="true"
ItemSelector="div.search-item" MinChars="1" ForceSelection="false" FieldLabel="#Heading#">
<Template runat="server">
<tpl for=".">
<div class="search-item">
<span class="name">{NameString}</span> <span class="locale">{LocaleString}</span>
</div>
</tpl>
</Template>
</ext:ComboBox>
and then put this control inside an anchor in a FormLayout.the problem is I am getting this error:
Coolite.Ext.Web.ItemsCollection`1[[Coolite.Ext.Web.Component, Coolite.Ext.Web, Version=0.8.3.27681, Culture=neutral, PublicKeyToken=f58c952e9aa5b80a]] must have items of type 'Coolite.Ext.Web.Component'. 'user:ComboBoxHeading' is of type 'ASP.controls_comboboxheading_ascx'.
how can I achieve this (using Coolite 0.8)?
Last edited by geoffrey.mcgill; Dec 06, 2010 at 4:05 PM.
Reason: [CLOSED]