Feb 08, 2013, 10:42 AM
[CLOSED] MultiCombo Keep selection during page transitions
What I'm doing wrong when I use a store to populate MultiCombo.
As you can see in the example bellow the MultiCombo doesn't keep the selection if I click next page and select new records.
Here is a code to reproduce this error.
Design
http://forums.ext.net/showthread.php...n-through-page
But doesn't work as expected.
As you can see in the example bellow the MultiCombo doesn't keep the selection if I click next page and select new records.
Here is a code to reproduce this error.
Design
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server">
</ext:ResourceManager>
<form id="form1" runat="server">
<ext:MultiCombo runat="server" ID="myCombo" PageSize="5" Width="250" SelectionMode="All">
<Store>
<ext:Store runat="server">
<Reader>
<ext:ArrayReader>
<Fields>
<ext:RecordField Name="text" />
<ext:RecordField Name="value" />
</Fields>
</ext:ArrayReader>
</Reader>
</ext:Store>
</Store>
</ext:MultiCombo>
</form>
</body>
Code behind protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
//popular a combobox
var store = myCombo.GetStore();
store.DataSource = Data;
store.DataBind();
}
}
private object[] Data
{
get
{
object[] result = new object[100];
for (int i = 0; i < 100; i++)
{
result[i] = new object[]
{
"text " + i,
"value " + i
};
}
return result;
}
}
I tried this example,http://forums.ext.net/showthread.php...n-through-page
But doesn't work as expected.
Last edited by Daniil; Feb 08, 2013 at 11:45 AM.
Reason: [CLOSED]