Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Commented Issue: AjaxToolkit ReorderList ->ReorderListItem.DisplayIndex bug [27139]

$
0
0
(I'm having to fix somebody else's code here...)

anyone know how to get the correct .displayindex value on postback for a reorderlist (obviously after someone has reordered the list)?

i.e.

Dim didx As Integer = -1
Dim lblScaleItem As Label
For i As Integer = 0 To rlScaleItems.Items.Count - 1
If Not rlScaleItems.Items(i).IsAddItem Then ' real UI/DB list item
didx = rlScaleItems.Items(i).DisplayIndex
lblScaleItem = DirectCast(rlScaleItems.Items(i).FindControl("lblScaleItem"), Label)
End If
Next

My rlScaleItems.Items(i).DisplayIndex values are always from the page_load and NOT updated after reordering.

We use this control all the time w/o issue (but BOUND), and never trying to persist all of this junk (based on the end-user saying SAVE or CANCEL for all of the edits/reorders).

Thanks
Rob K
Comments: even attempting to update the list on reorder, does nothing Protected Sub rlScaleItems_ItemReorder(ByVal sender As System.Object, ByVal e As AjaxControlToolkit.ReorderListItemReorderEventArgs) 'reorder item Me.Scale.MoveItem(e.OldIndex, e.NewIndex) ScaleItemChanged = True ' RAK 4/18/2012 For i As Integer = 0 To rlScaleItems.Items.Count - 1 ' RAK 4/18/2012 If Not rlScaleItems.Items(i).IsAddItem Then ' real UI/DB list item Me.rlScaleItems.UpdateItem(i) End If Next End Sub

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>