Aug 06, 2012, 7:34 AM
[CLOSED] [#111] How to filter combo box data using the text that exists in the middle
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
var store = this.SelectBox1.GetStore();
store.DataSource = new object[]
{
new object[] { "AL", "The Heart of Dixie ", "The Heart of Dixie" },
new object[] { "AK", "The Land of the Midnight Sun", "The Land of the Midnight Sun" },
new object[] { "AZ", "The Grand Canyon State", "The Grand Canyon State" },
};
store.DataBind();
}
</script>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<title>SelectBox - Ext.NET Examples</title>
<link href="/resources/css/examples.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:ComboBox
ID="SelectBox1"
runat="server"
DisplayField="state"
ValueField="abbr" QueryMode="Local"
EmptyText="Select a state...">
<Store>
<ext:Store ID="Store1" runat="server">
<Model>
<ext:Model ID="Model1" runat="server">
<Fields>
<ext:ModelField Name="abbr" />
<ext:ModelField Name="state" />
<ext:ModelField Name="nick" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
</ext:ComboBox>
</form>
</body>
</html>
When i type "Dixie" then item "The Heart of Dixie" should filter in the combo box, how to achieve that?
Last edited by Daniil; Mar 14, 2013 at 11:56 AM.
Reason: [CLOSED]