When I drag reorder or reorder with the buttons, it works great, but then when I post back via a save button and loop through the items, the Text is in the right order, but the Value is the original value.
So a simple name list
Ken (id 1234)
Brian (id 2345)
Matt (id 3456)
if I reordered Matt to the top, the result during the "SAVE" postback would be:
Matt (id 1234)
Ken (id 2345)
Brian (id 3456)
(notice the IDs have not changed)
Can anyone help??
Here the code.
<telerik:RadListBox ID="listReorder" Width="250px"
ButtonSettings-VerticalAlign="Middle" Height="300px" AllowReorder="true"
EnableDragAndDrop="true" DataKeyField="PersonID" DataTextField="PersonFullName"
ButtonSettings-ShowReorder="true" runat="server"/>
protected void btnSave_Click(object sender, EventArgs e)
{
foreach (RadListBoxItem item in listReorder.Items)
{
string fullName = = item.Text; //LOOKS GOOD
int personID = Convert.ToInt32(item.DataKey); //ORIGINAL DATA BOUND VALUE
}
}