Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How To: make the datalist scroll to the cell being edited?

Reply
Thread Tools

How To: make the datalist scroll to the cell being edited?

 
 
Alan Silver
Guest
Posts: n/a
 
      02-17-2005
Hello,

I have a datalist which I am using to view and modify some data. When
the user clicks the "edit" link, the appropriate cell is moved into edit
mode, as specified in the EditTemplate.

The problem is that if the data table is longer than the browser window,
so the user has to scroll down to see parts of it, then when they are
taken to edit mode, the page loads and stays at the top of the table.
They then have to scroll down and find the cell they asked to edit.

Any way to take them straight to the cell? Any other solutions to the
problem, for example forcing the row containing the cell to be edited to
the top of the table, etc?

Any suggestions appreciated.

--
Alan Silver
(anything added below this line is nothing to do with me)
 
Reply With Quote
 
 
 
 
Ollie Riches
Guest
Posts: n/a
 
      02-17-2005
you can use SmartNavigation to do this. It will persist page scroll position
and page focus between postbacks. Unfortuantely this will only work in IE
browsers. check out

http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfSystemWebUIPageClassSmartNavigationTopic.asp

I guess if you want to support non IE browsers you could use an anchor
instead


--
HTH

Ollie Riches
http://www.phoneanalyser.net

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a programmer
helping programmers.


"Alan Silver" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> I have a datalist which I am using to view and modify some data. When
> the user clicks the "edit" link, the appropriate cell is moved into edit
> mode, as specified in the EditTemplate.
>
> The problem is that if the data table is longer than the browser window,
> so the user has to scroll down to see parts of it, then when they are
> taken to edit mode, the page loads and stays at the top of the table.
> They then have to scroll down and find the cell they asked to edit.
>
> Any way to take them straight to the cell? Any other solutions to the
> problem, for example forcing the row containing the cell to be edited to
> the top of the table, etc?
>
> Any suggestions appreciated.
>
> --
> Alan Silver
> (anything added below this line is nothing to do with me)



 
Reply With Quote
 
 
 
 
Alan Silver
Guest
Posts: n/a
 
      02-17-2005
>you can use SmartNavigation to do this. It will persist page scroll position
>and page focus between postbacks. Unfortuantely this will only work in IE
>browsers. check out
>
>http://msdn.microsoft.com/library/de...us/cpref/html/
>frlrfSystemWebUIPageClassSmartNavigationTopic.a sp
>
>I guess if you want to support non IE browsers you could use an anchor
>instead


How can I do that? I don't have control over the postback URL (do I?),
so I can't add an anchor to it.

Please clarify this last bit as I would like a cross-browser solution.

Thanks

>--
>HTH
>
>Ollie Riches
>http://www.phoneanalyser.net
>
>Disclaimer: Opinions expressed in this forum are my own, and not
>representative of my employer.
>I do not answer questions on behalf of my employer. I'm just a programmer
>helping programmers.
>
>
>"Alan Silver" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>> Hello,
>>
>> I have a datalist which I am using to view and modify some data. When
>> the user clicks the "edit" link, the appropriate cell is moved into edit
>> mode, as specified in the EditTemplate.
>>
>> The problem is that if the data table is longer than the browser window,
>> so the user has to scroll down to see parts of it, then when they are
>> taken to edit mode, the page loads and stays at the top of the table.
>> They then have to scroll down and find the cell they asked to edit.
>>
>> Any way to take them straight to the cell? Any other solutions to the
>> problem, for example forcing the row containing the cell to be edited to
>> the top of the table, etc?
>>
>> Any suggestions appreciated.
>>
>> --
>> Alan Silver
>> (anything added below this line is nothing to do with me)

>
>


--
Alan Silver
(anything added below this line is nothing to do with me)
 
Reply With Quote
 
Alan Silver
Guest
Posts: n/a
 
      02-17-2005
>you can use SmartNavigation to do this. It will persist page scroll
>position and page focus between postbacks. Unfortuantely this will only
>work in IE browsers. check out
>
>http://msdn.microsoft.com/library/de.../en-us/cpref/h
>tml/frlrfSystemWebUIPageClassSmartNavigationTopic.asp


I just tried this and it stopped my "edit" linkbutton from working. When
I added the page directive, nothing happened when I clicked on the
linkbutton. As soon as I removed the directive, it worked again.

Any explanation? It's a shame as it's a nice feature.

--
Alan Silver
(anything added below this line is nothing to do with me)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enable Scroll up and scroll down in CR-report Sathiamoorthy ASP .Net 1 11-28-2006 11:42 PM
Using a div with scroll bars - can we get the scroll bars on the left instead of the right side? UJ ASP .Net 1 11-01-2006 09:32 PM
change the scroll speed of a scroll pane? Kevin Java 1 02-05-2005 09:42 AM
prevent mouse scroll to scroll in a dropdownlist nicholas ASP .Net 0 12-07-2004 11:26 AM
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll ASP .Net 8 09-09-2004 10:13 PM



Advertisments