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: looking at the source code for the Reorderlist control, why is the displayindex property returning itenindex as it's value? ( 9 lines below "//DataItem implemented above )

Viewing all articles
Browse latest Browse all 4356

Trending Articles