/    Sign up×
Community /Pin to ProfileBookmark

Datagrid rows

My datagrid has some textboxes, When I click the down arrow I want to pass to textbox which is under the textbox that I pressed down arro. The problem is how can I find a related value with the textbox that I press the down key. Then I can find the other textbox and focus on it. Thanx for help

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@Mr_JAug 26.2004 — Do you mean something like this?


<script>

function test(n){

p=document.f1[n].offsetTop-20

window.scrollTo(0,p)

}

</script>

<form name="f1">

<input type="text" name="t1" value="Textbox 1">

<input type="button" value="Next" onclick="test('t2')">

<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>

<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>

<input type="text" name="t2" value="Textbox 2">

<input type="button" value="Next" onclick="test('t3')">

<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>

<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>

<input type="text" name="t3" value="Textbox 3">

<input type="button" value="Next" onclick="test('t4')">

<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>

<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>

<input type="text" name="t4" value="Textbox 4">

<input type="button" value="Next" onclick="test('t5')">

<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>

<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>

<input type="text" name="t5" value="Textbox 5">

<input type="button" value="Next" onclick="test('t1')">

<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>

<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>

<form>
Copy linkTweet thisAlerts:
@cannnnauthorAug 27.2004 — Sorry I didn't understand where to put this code, Can you write the whole code ?
Copy linkTweet thisAlerts:
@Mr_JAug 27.2004 — The above was just an example to give you an idea on how it may be done.

It all depends on how your datagrid and code is constructed
×

Success!

Help @cannnn spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...