The WebDropdown (13.1.20131.2107) will load the next set of items when you are near the end of the list of currently loaded items, and use the mouse to click down.
However, if you use the down arrow key to scroll through the end, and reach the end of the currently loaded items, then further presses of the down arrow key do not load more items, but I think they should - if there are items to load...
The infragistics sample for the webdropdown load on demand feature demonstrates this behaviour.
Is there some simple way to make it load the next items on the arrow key press?
I came up with a workaround. I handle the keydown on the combo and check the keycode:
case 40: // down arrow if (combo.get_enableLoadOnDemand()) { var activeItemIndex = combo.get_activeItemIndex(); if (activeItemIndex) { var count = combo.get_items().getLength(); if (count && activeItemIndex === (count - 1)) { // The active item is the last item in the list and the // down arrow is pressed, // trigger load on demand combo.selectItemByIndex(activeItemIndex, true, true); combo._elements['DropDownContents'].scrollTop += 1 combo._scrollingLoadOnDemand(); return false; } } }
Edit: added the selectItemByIndex which means that the last item in the list will be reselected after the postback.
Hello Jonathan,
Thank you for posting solution to our forums. By default WebDropDown doesnot support load on demand for down arrow key.