Question

Asked on 2011-05-09 at 07:55:51ID: 27360739

Scroll to CheckBox in CheckBoxList

by: bamapie500

Rating8.0Very Good

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:

Select allOpen in new window

Related Solutions

Solution

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.

About this Solution

View This Solution - Start Your 30 Day Free Trial
Zone
general
Tags
Participating Experts
1
Solution Grade
A

Replies

 by: iHadi

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.

 by: bamapie

Posted on 2011-05-09 at 11:44:00ID: 36812490

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.

Log In

Forgot your password?Sign up

Top Experts

  1. mplungjan

    1,840

    0 points yesterday

    Profile

BrowseAre you an Expert?