Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.
I have an ASP.NET CheckBoxList control in my form. A CBL control renders as an HTML table with rows where on each row is a single TD cell containing the INPUT checkbox and a label.
See below for example rendering.
My CBL control is inside a DIV with a set height and vertical scrollbar on. So what I want to do is, to scroll to a certain row.
I'm stuck at the point where I'm in the JavaScript function handling the partial postback. CBL has just been refreshed. I have the TD that I want to scroll to.
I just don't know how. How do I make a certain row the "topmost" in my DIV which contains this table?
Got to be a way. I'd settle for a Firefox-only solution if you've got it, though I'd prefer an IE-compatible solution too.
Thank you!
<div id="divUsers" class="UsersArea">
<table id="chkboxlistUsers" class="chkboxlist1" border="0">
<tr>
<td><input id="chkboxlistUsers_0" type="checkbox" name="chkboxlistUsers$0" onclick="javascript:chkboxUserID_Clicked(this,'','*TBD*');" /><label for="chkboxlistUsers_0">*TBD*</label></td>
</tr><tr>
<td><input id="chkboxlistUsers_1" type="checkbox" name="chkboxlistUsers$1" onclick="javascript:chkboxUserID_Clicked(this,'','A-CREW');" /><label for="chkboxlistUsers_1">A-CREW</label></td>
</tr>
...etc...
1: 2: 3: 4: 5: 6: 7: 8:
Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.
Posted on 2011-05-09 at 08:36:05ID: 36812489
All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.