I'm having trouble with the RadListBox on selected index changed. OnSelectedIndexChanged does not fire an event at all and OnClientSelectedIndexChanged gives a JS error.
I'm using the RadListBoxes to move items around as described in http://demos.telerik.com/aspnet-ajax/listbox/examples/overview/defaultcs.aspx#qsf-demo-source
But I also need to display information about the single selected item so the user knows if this is the right item to move. But I'm getting a Error: 'AllGroupsRadListBox_SelectedIndexChanged' is undefined.
<
telerik:RadListBox
runat
=
"server"
ID
=
"AllGroupsRadListBox"
Height
=
"200px"
Width
=
"200px"
AllowTransfer
=
"true"
SelectionMode
=
"Single"
TransferToID
=
"SharedGroupsRadListBox"
OnClientSelectedIndexChanged
=
"AllGroupsRadListBox_SelectedIndexChanged"
/>
<
telerik:RadListBox
runat
=
"server"
ID
=
"SharedGroupsRadListBox"
Height
=
"200px"
Width
=
"200px"
/><
br
/>
Users in selected group:<
br
/>
<
telerik:RadListBox
runat
=
"server"
ID
=
"UsersRadListBox"
Height
=
"200px"
Width
=
"200px"
/>
private void FillAllGroups()
{
BWGroups allGroups = new BWGroups();
allGroups.GetAllBWGroups();
AllGroupsRadListBox.DataTextField = "BWGroupName";
AllGroupsRadListBox.DataValueField = "BWGroupID";
AllGroupsRadListBox.DataSource = allGroups.BWGroupList;
AllGroupsRadListBox.DataBind();
}
protected void AllGroupsRadListBox_SelectedIndexChanged(object sender, EventArgs e)
{
int parseGroupId = -1; Int32.TryParse(AllGroupsRadListBox.SelectedValue.ToString(), out parseGroupId);
BWUsers usersInGroup = new BWUsers();
if(parseGroupId > 0)
usersInGroup.GetActiveBWUsersByGroupID(parseGroupId);
UsersRadListBox.DataTextField = "BWGroupName";
UsersRadListBox.DataValueField = "BWGroupID";
UsersRadListBox.DataSource = usersInGroup.BWUserList;
UsersRadListBox.DataBind();
}