View Full Version : [CLOSED] Multiple Combo-boxes - Same Store - Odd Behavior

Jun 13, 2012, 12:58 PM
I have a grid with a RowEditing plugin. When in edit mode, I have four of the fields which each have a combo-box editor (employee names/ids) which all use the EmployeeData store. Each of the combo-boxes have unique IDs are are configured in the markup. When using the combo-boxes in simple, drop-down and mousing to select an item, they all work fine. However, if I use the type-ahead feature and type a name in one box, they all are filtered for that value. I don't think this is normal behavior. However, I am not sure what to expect when using a single store. For clarification here is the store:

@(Html.X.Store().ID("EmployeeData") _
.DataSource(ViewData("Employees")) _
rdr.Add(New Ext.Net.JsonReader())
End Sub) _
flds.Add("Selected", Ext.Net.ModelFieldType.Boolean)
flds.Add("Value", Ext.Net.ModelFieldType.Int)
End Sub).IDProperty("Value"))
End Sub))

Here is one combo:

cols.Add(Html.X.Column().DataIndex("DrafterEmployeeID").Text("Drafter").Renderer(New Ext.Net.Renderer() With {.Fn = "employeeRenderer"}).Editor(Sub(edt)
Dim cbo As New Ext.Net.ComboBox
With cbo
.ID = "DrafterEmployeeID"
.StoreID = "App.EmployeeData"
.MultiSelect = False
.AutoDataBind = True
.QueryMode = DataLoadMode.Local
.TypeAhead = True
.DisplayField = "Text"
.ValueField = "Value"
End With
End Sub))

Again, the only differences in the 4 colums are:
Column - different data index, different text
Combo - different ID

Jun 13, 2012, 2:21 PM

Please try to set up

<Focus Handler="this.getStore().clearFilter();" />
listener for the ComboBox.


<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<script runat="server">
protected void Page_Load(object sender, EventArgs e)
if (!X.IsAjaxRequest)
this.Store1.DataSource = new object[]
new object[] { "1", "a" },
new object[] { "2", "b" },
new object[] { "3", "c" }

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ext.NET v2 Example</title>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:Store ID="Store1" runat="server">
<ext:Model runat="server">
<ext:ModelField Name="value" />
<ext:ModelField Name="text" />
<ext:ArrayReader />
<ext:ComboBox runat="server" StoreID="Store1" QueryMode="Local">
<Focus Handler="this.getStore().clearFilter();" />
<ext:ComboBox runat="server" StoreID="Store1" QueryMode="Local">
<Focus Handler="this.getStore().clearFilter();" />

Jun 13, 2012, 4:23 PM
That did it. Thank you.