473,321 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

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

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)
Nov 19 '05 #1
3 2077
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" <al*********@nospam.thanx> wrote in message
news:60**************@nospamthankyou.spam...
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)

Nov 19 '05 #2
>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" <al*********@nospam.thanx> wrote in message
news:60**************@nospamthankyou.spam...
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)
Nov 19 '05 #3
>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)
Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Alex | last post by:
Imports System Imports System.Data Imports System.Data.SqlClient Imports System.Web.UI Imports System.Web.UI.WebControls Imports System.Configuration Public Class Main : Inherits Page ...
4
by: jenn | last post by:
Hi Anyone knows how to access to a value of a row in a datalist. Something like this in datagrid Dim str = MyDataGrid.Cell(0).tex I would like something like this Dim str =...
0
by: massimop | last post by:
Hi to all, I use a datalist, that should return a table with 3 columns. The cell of the first column is used to show an image . The cell of the second colun is used to show a * (separator) ....
1
by: Paul Say | last post by:
Here is the problem, I have a datalist that builds a list of links horizontally across the screen for a menu bar. i.e <asp:datalist id="menuTabs" runat="server> <ItemTemplate>...
2
by: Hrvoje Vrbanc | last post by:
Hi all! I have a DataList with fixed number of columns and variable number of rows (depending of the number of rows in the database). Now, I'd like to put a RadioButton control in every DataList...
2
by: Andrew | last post by:
Hi, How do I access the cells of a table that is located in a datalist control ? I have the datalist control and some asp controls in it up n it is working fine. My datalist is bound to a...
1
by: Adam Knight | last post by:
Hi all, I have a datalist..whose content is editable. I am using a link button to place a data list item in edit mode. What i am after is some way i can cause the page containing the data...
4
by: phil2phil | last post by:
Hi, Right now I have a datalist, that renders the following html: <tr> <td class="daycss" align="Left" valign="Top" style="background-color:#EEEEEE;height:20px;"> <div...
3
by: Peter | last post by:
I have a datalist and I want the datalist to grow from no records to fill the screen, but not go beyond the screen height. How do I do that? I've implemented the scroll bars but it works only for...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.