473,769 Members | 6,034 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SmartNavigation

Rob
Hello,

I have a <DIV> in my Datagrid which produces scrollbars
when it is populated. When I click the Edit button in the
edit comand column I need to be able to maintain the
scroll position. According to MSDN, setting
SmartNavigation ="True" in the @Page directive will achieve
this but unfortunately it does not, does anybody know how
to do this? I have found an article explaining how to do
this with c# (by creating a Inet Explorer behaviour) but I
am using vb and want to keep it as simple as possible if I
can?

Cheers

Rob
Nov 18 '05 #1
2 4325
"Rob" <an*******@disc ussions.microso ft.com> wrote in message news:<00******* *************** ******@phx.gbl> ...
Hello,

I have a <DIV> in my Datagrid which produces scrollbars
when it is populated. When I click the Edit button in the
edit comand column I need to be able to maintain the
scroll position. According to MSDN, setting
SmartNavigation ="True" in the @Page directive will achieve
this but unfortunately it does not, does anybody know how
to do this? I have found an article explaining how to do
this with c# (by creating a Inet Explorer behaviour) but I
am using vb and want to keep it as simple as possible if I
can?

Cheers

Rob


http://www.strengthtechnologies.com/.../Download.aspx

I think this will do what you want. it is very simple to use. download
it to yu bin directory.
put
<%@ Register TagPrefix="cc1" Namespace="Stre ngthControls.Sc rolling"
Assembly="Stren gthControls.Scr olling" %>

at the top of your aspx, and

<cc1:SmartScrol ler id="SmartScroll er1" runat="server" />

somwhere in the <body> of your document.
bob==uncle

Smartnavigation = evil imho, only "works" on ie browser, and seems to
create more hassles than its worth. set to "false"!

fragg
Nov 18 '05 #2
"Rob" <an*******@disc ussions.microso ft.com> wrote in message news:<00******* *************** ******@phx.gbl> ...
Hello,

I have a <DIV> in my Datagrid which produces scrollbars
when it is populated. When I click the Edit button in the
edit comand column I need to be able to maintain the
scroll position. According to MSDN, setting
SmartNavigation ="True" in the @Page directive will achieve
this but unfortunately it does not, does anybody know how
to do this? I have found an article explaining how to do
this with c# (by creating a Inet Explorer behaviour) but I
am using vb and want to keep it as simple as possible if I
can?

Cheers

Rob


Hi Rob, not sure smartnav works well with grids, i doubt itll keep
position within DIV, it only keeps scroll position on the main scroll
bar.

Anyway , we did the following to keep edit position on the edit
selected with a DIV:

add the follwing to the main class variables of the form:
private int itemCount = 0;

In the ItemDataBound event of your grid add the following code to add
a number bookmark to each row in the grid that is created:
//************Ite mDataBound***** *************** ******
// placing a bookmark against the first column
LiteralControl anchor = new LiteralControl( );
anchor.Text = "<a name=\"" + itemCount.ToStr ing() + "\">";
itemCount ++;
e.Item.Cells[0].Controls.Add(a nchor);
//************Ite mDataBound***** *************** ******

Then in the EditCommand event method add the following code to get the
browser to jump to the item when the page reloads:
//*************Ed itCommand *************** ***********
System.Text.Str ingBuilder jScript = new System.Text.Str ingBuilder();
jScript.Append( "<script language=\"Java Script\">");
jScript.Append( "location.href= \"#");
jScript.Append( e.Item.ItemInde x.ToString());
jScript.Append( "\";");
jScript.Append( "</script>");

this.RegisterCl ientScriptBlock ("Bookmark", jScript.ToStrin g());
//************Edi tCommand *************** **********

You may then want to add the above edit commmand code into any method
that ou want to retain position, e.g. UpdateCommand and CancelCommand.
We put the above code into a function and passed in the ItemIndex from
whatever event function was called (SelectCommand, EditCommmand,
UpdateCOmmand, CancelCommand

Hope that helps.

Ryan Harvey, IBM
Nov 18 '05 #3

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

Similar topics

0
1168
by: karim | last post by:
I have a datalist with an itemedittemplate. When I have smartnavigation on, I can't exit out from edit mode with EditItemIndex = -1. When smartnavigation is off, everything works fine. I know smartnavigation has problems. It seems this is one of them. I am thinking of simulating smartnavigation using anchor links. Anyone had success with them? karim
1
1279
by: Jerad Rose | last post by:
I've done some investigating about various problems with the SmartNavigation feature. It seems to me that the general consensus is to avoid SmartNavigation like the plague. It's really a shame that such a potentially handy feature has been rendered useless because of all of the bugs surrounding it. Has Microsoft acknowledged the existence of the many bugs with SmartNavigation? If so, have we any indication as to if and when these will...
4
1516
by: Chris Ruegsegger | last post by:
I have a registration type page that asks a series of questions but does so using Panels to display only a couple at a time. I have a Next and Back button on each panel for navigation purposes. Some of the next buttons have Validation enabled for input checking. SmartNavigation is set to True. If I proceed a few Panels in to the registration and try to backup using a Back button I get a script debug error from IE stating a value is...
2
1434
by: Snig | last post by:
Hi All I wanted to enable "SmartNavigation" in my site. For this I put <pages smartNavigation="true" /> in web.config file. So far so good. But it causes the link from the aspx pages to the css files be broken. When an aspx page opens up for the first time, it displayed everything fine as per the linked css file. But after postback the page is displayed without any formatting, i.e. as if it could not find the css file.
2
1787
by: SLE | last post by:
A web user control exposes a RadioButtonList (with AutoPostBack = true) called "Question". This control also has an embedded RequiredFieldValidator control. 1. Main ASPX page is populated with several "Questions". 2. Within the code of the main page, there is a SelectedIndexChanged handler for the RadioButtonList exposed by Question. The function loops through a number of questions on the pages and hides/shows questions (control.visible...
4
387
by: Dagong Wang | last post by:
Hi, I have an ASP.NET application that works fine in my testing server. However, when I uploaded it into a hosting server, page SmartNavigation option and server side redirection, such as FormsAuthentication.RedirectFromLoginPage, quit working. They told me to recompile the code there, and it did not solve these issues. Do you have any clue what might cause the difference? Thank you very much.
4
1517
by: Bobby | last post by:
Hi all... I rather confuse using smartnavigation in my web application because if I set the "smartnavigation = true" then If I run my app, then after I post page that page, using event dropdownlist1_selectedIndexChanged then the page would't get the css, and then the IE will generate error confirmation dialog, then my browser will be closed. I'm using iframe for my app, 2 frame -> top frame and content frame. I use smartnavigation for...
3
1890
by: Nestus | last post by:
Hi, im developing a solution in ASP.Net, i have a page that i need to use the smartnavigation in true, the problem occurs when i put in the directive @Page SmartNavigation = true my page trhows a error in the next line, i really dont understand why the page trhows that error. Here is the line that make the error. Response.Write("<script language=javascript>window.parent.frames.location='OpcionReporte.a spx';</script>")
2
2022
by: Wysiwyg | last post by:
Has anyone found a reasonable way to emulate smartnavigation functionality for any browser? I'd really like to avoid creating history entries when posting back to the same page. SmartNavigation takes care of the annoying problem caused by creating a new history entry when a page posts to itself. Only Internet Explorer will support this functionality. When SmartNavigation is enabled the client executes javascript code from the SmartNav.js...
5
4275
by: Mogens Nielsen - Elbek & Vejrup A/S | last post by:
Hi, I can see from the msdn-docs that SmartNavigation is now obsolete. Why is that? The SmartNavigation feature has been replaced by MaintainScrollPosition, but the scoll position is not why we're using the feature. It is mainly to avoid the flickering when posting back. However we've got another project running, for which we would like to turn SmartNavigation on, as we have an idea, that it will cause McAfee ScriptScan to scan less...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8873
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5309
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3565
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.