Dec 05, 2013, 3:29 PM
[CLOSED] Problem with special characters in selectbox
Hi,
I need to insert in a selctbox a description with special characters: <NULL>.
If I put directly <NULL> the selectbox does not show it, if I put <NULL> the list of the selecbox is correct but not the value in field.
See my example.
Thank you
Jimmy
I need to insert in a selctbox a description with special characters: <NULL>.
If I put directly <NULL> the selectbox does not show it, if I put <NULL> the list of the selecbox is correct but not the value in field.
See my example.
Thank you
Jimmy
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
Store store = this.SelectBox1.GetStore();
store.DataSource = new object[]
{
new object[] { "99", "<NULL>", "NO DATA" },
new object[] { "AL", "Alabama", "The Heart of Dixie" },
new object[] { "AK", "Alaska", "The Land of the Midnight Sun" },
new object[] { "AZ", "Arizona", "The Grand Canyon State" },
};
store.DataBind();
this.SelectBox1.Select("99");
this.SelectBox1.SelectedItem.Value = "99";
}
</script>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<title>SelectBox - Ext.NET Examples</title>
</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:SelectBox
ID="SelectBox1"
runat="server"
DisplayField="state"
ValueField="abbr"
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:SelectBox>
</form>
</body>
</html>
Last edited by Daniil; Dec 10, 2013 at 10:56 AM.
Reason: [CLOSED]