Showing posts with label enabled. Show all posts
Showing posts with label enabled. Show all posts

Wednesday, March 28, 2012

Programmatically Scroll GridView Control

I have an AJAX enabled web form with several data-filled GridView controls. The users accessing this web app will navigate the site via touch-screen monitors (i.e.: no mouse). As a result, I need an easy way for them to scroll the GridViews when the data is not visible. I want them to click on a button, which will then accordingly scroll the grid up or down. I have tried all the various combinations of the suggestions that I could find:

GridView.Rows(20).RowState = DataControlRowState.Selected

and

GridView.Rows(20).Focus()

and

GridView.SelectedIndex = 20

and

'Set focus to a hidden button control (column)
GridView.SelectedRow.Cells(5).Focus()

If I could set focus to a particular row, I think it should scroll to show that row. This would be fine, but nothing seems to work. Anyone have any suggestions on how I could programatically scroll a GridView control?

Thanks!

Hi AxeRose,

Did you find any solution for this problem?

I have asimilar purpose and meantime I don't have no idea, how to do this.


No, I never found a solution. I ended up using Paging instead -- which works fine for my situation.

Good luck!


I do not know if this works (and probably only in IE or in everything but IESmile ) but there is a javascript function called scrollIntoView that you could try. Just a suggestion.


Seehttp://forums.asp.net/t/1162570.aspx

You can use the JavaScript function: scrollTo(...)

-Damien


<script type="text/javascript">
var prm = Sys.WebForms.PageRequestManager.getInstance();

prm.add_beginRequest(beginRequest);

function beginRequest()
{
prm._scrollPosition = null;
}
</script>

http://forums.asp.net/t/1156877.aspx

Wednesday, March 21, 2012

Question in regards to deploying AJAX enabled application to Windows 2003 server

I have developed an AJAX enabled web site on a Vista machine. The page I will be refering to contains ScriptManager, UpdatePanels and CollapsiblePanel. This page works fine on the local machine. However when I deployed this application to a Windows 2003 server (Framework 2.0 and ASP.NET 2.0 AJAX Extensions 1.0 installed) and try to invoke it, I get the following error. Any help will be appreciated.

--------
Windows Internet Explorer
--------
Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error parsing near '<!DOCTYPE HTML PUBLI'.
--------
OK
--------

Are you using a Firewall on the server, I've seen issues with some firewalls and a setting "Remove Unknown Headers"

Check outhttp://alpascual.com/blog/al/archive/2007/04/26/How-to-fix-Sys.WebForms.PageRequestManagerParserErrorException-in-AJAX.aspx for a potential fix.

Also see this:http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx for help on debugging the issue.

-Damien

Question on AJAX enabling a website

I have a question for those of you who have AJAX enabled your website. My company hired a consulting company to re-write our ASP site into NET. When the project leader from the consulting company was demonstrating the site's functionality to our company, I asked a few questions. I was particularly concerned that a number of pages were doing excessive page postbacks. When I asked whether these pages could implemented with an AJAX control like an Update Panel, he recommended using AJAX only when necessary. His reason was that the product isn't mature yet and that a number of browsers are having computability problems with Javascript being rendered. Not that we have any non-USA clients,, but he claims that this particularly true non-USA browsers. Has anyone else found this to be true?

Thanks

pcdanno:

but he claims that this particularly true non-USA browsers.

Maybe we should define what are those "non-USA browsers" are...


Thanks for your response. Perhaps "non-USA" browsers was a poor term on my part. Essentially I was told that some of their foreign users were having trouble using AJAX sites from their sites. I was just wondering whether anyone encountered browser incompatability with AJAX or the AJAX Component Toolkit.


In short : No, he's feeding you a line. I've personally had some pretty good success w/ AJAX as a principle. I've not investigated Microsoft's AJAX library intensively but it also looks like it's pretty well written.


He's trying to FUD you out of making him better design the application. The ASP.NET AJAX framework is as robust as any you'll find. No reason at all to avoid it.