I have a radListBox with one item in it (loaded on the server side). That item is checked.
When I insert another item above it on the client side, the new item becomes the only checked item, and the existing checked item loses it's checked status, even though it still APPEARS to be checked. I AM using trackChanges and commitChanges.
To verify this:
Before inserting, display the value of rlbTest.get_checkedItems()[0].get_text(). It will display the text of the initial item.
After inserting a new item (not yet checked) at the same index as the existing item using itemList.insert(itemList.indexOf(oldItem), newItem) display the value of get_checkedItems()[0].get_text() again. It displays the value of the NEW item, even though that item is not yet checked! If you display get_checkedItems.length it will show 1.
Now set the new item checked, and commit the changes. Display the two values again. length is still only 1, and value is the value of the new item.
The old item still appears to be checked. Both items will return .get_checked() == true. But when posted back to the server, .GetCheckedIndices returns just ONE index - 0 (the new item).
Just found that the same problem appies to selected items!
When I insert another item above it on the client side, the new item becomes the only checked item, and the existing checked item loses it's checked status, even though it still APPEARS to be checked. I AM using trackChanges and commitChanges.
To verify this:
Before inserting, display the value of rlbTest.get_checkedItems()[0].get_text(). It will display the text of the initial item.
After inserting a new item (not yet checked) at the same index as the existing item using itemList.insert(itemList.indexOf(oldItem), newItem) display the value of get_checkedItems()[0].get_text() again. It displays the value of the NEW item, even though that item is not yet checked! If you display get_checkedItems.length it will show 1.
Now set the new item checked, and commit the changes. Display the two values again. length is still only 1, and value is the value of the new item.
The old item still appears to be checked. Both items will return .get_checked() == true. But when posted back to the server, .GetCheckedIndices returns just ONE index - 0 (the new item).
Just found that the same problem appies to selected items!