May 18, 2009, 1:19 PM
Filtering data befor a Combobox is loaded from a Store Object
Hello,
Given the following HTML source, how can I filter out some values before loading the Xml data into the Combobox if the user cannot see some items from it?
<asp:XmlDataSource ID="XmlReferenceTablesDataSource1" runat="server" DataFile="ReferenceTables.xml"
TransformFile="ReferenceTables.xsl" />
<ext:Store ID="storeReferenceTableList" runat="server" OnRefreshData="Refresh_References"
OnSubmitData="Store1_Submit" DataSourceID="XmlReferenceTablesDataSource1"
AutoLoad="true" ondatabound="storeReferenceTableList_DataBound">
<AjaxEventConfig IsUpload="true" />
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="Name" />
<ext:RecordField Name="Description" />
<ext:RecordField Name="TableSchemaName" />
</Fields>
</ext:JsonReader>
</Reader>
<SortInfo Field="Name" Direction="ASC" />
</ext:Store>
...
...
<ext:ComboBox ID="tablescmbx1" runat="server"
StoreID="storeReferenceTableList"
Editable="false"
DisplayField="Name"
ValueField="TableSchemaName"
TypeAhead="true"
Mode="Local"
ForceSelection="true"
EmptyText="Select a table..."
Resizable="true"
Selectonfocus="true"
TriggerAction="All">
<AjaxEvents>
<Select OnEvent="tablescmbx1_Selected" ViewStateMode="Include">
<ExtraParams>
<ext:Parameter Name="TableName" Value="#{tablescmbx1}.getText()" Mode="Raw" />
</ExtraParams>
</Select>
</AjaxEvents>
</ext:ComboBox>
If have tried the Store_DataBound and Store_DataBinding with no luck coming up with a good way to do this.Thank you in advance,