|
Rank: Newbie Groups: Member
Joined: 11/27/2013 Posts: 2
|
Hello. I'm having some troubles with EO ListBox when AllowMultiSelect = true: SelectedIndexChanged event firing first time as expected, but after it if I try to select element below selected - SelectedIndexChanged event doesn't firing at all. If I select element above selected all works fine and event firing. So can you help me, what it could be?
Layout: <eo:ListBox runat="server" ID="LB_Doc" DataValueField="IdDoc" DataTextField="NameDoc" MultiSelectModifier="None" AllowMultiSelect="True" OnSelectedIndexChanged="LB_Doc_SelectedIndexChanged" AutoPostBack="True" Width="1000" Height="750"> </eo:ListBox>
Code behind: List<Doc> AllDocs= (from D in Context.Doc select D).ToList(); // Context from Entity Framework LB_Doc.DataSource = AllDocs; LB_Doc.DataBind();
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
This is an issue and we will have to change our code in order to address it. SelectedIndexChanged is only fired when the value of the SelectedIndex property changes, which I believe is always the index of the first selected item when multi-select is enabled. In your case, when you select items below already selected items, the first selected item does not change, thus SelectedIndex does not change. So the behavior that SelectedIndexChanged does not fire in your case is actually the correct behavior.
However obviously this causes the problem of not no event is raised when user indeed has changed the selection. So we will look into this and see if we can add an event, or force fire SelectedIndexChanged event in your case. We will post again as soon as we have any update on this issue.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
We have posted a new build that addressed this problem. The new build added a "SelectionChanged" event, which will be raised for the situation you described (SelectedIndexChanged event still will not fire). We will PM you as to the download location of the new build.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 11/27/2013 Posts: 2
|
Works fine. Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
You are very welcome. Please feel free to let us know if you have any more question.
Thanks!
|
|