Forum Replies Created

Viewing 1 post (of 1 total)
  • Author

  • Jhutt

    Resolved using a manipulated ‘ensureVisible’. My Listbox displays 13 rows of options so by using logic, the selectedIndex is not in the last 6 records so I can vertically center it in the ListBox, therefore using the following:

    <% if selectedmember <> "" then 
    	if counter - selectedmember > 6 then
    		selectedcounter = selectedmember + 6
    		selectedcounter = selectedmember + (counter - selectedmember)
    	end if
    	<script type="text/javascript">  
    	$("#memberlistbox").jqxListBox('ensureVisible', <%=selectedcounter%> ); 
    <% end if %>

    My ListBox now centers the pre-SelectedIndex unless it is the last 6 entries and then it adjusts it up from the bottom of the ListBox.

    Hope this might help someone else in the future.

Viewing 1 post (of 1 total)