Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / August 2006

Tip: Looking for answers? Try searching our database.

datagrid paging automatically (after 10 seconds)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gellert@gmx.at - 26 Aug 2006 13:15 GMT
Hello guys,

I have a Datagrid and .AllowPaging=true.... it is working well but I'd
like to page automatically after some seconds.
So the whole solution is a screen in our company showing some dates
which does not fit on 1 single screen so I'd like to automate the
Page-Event.

for example:
screen 1
after 10 seconds
screen 2 (second Page like if I click on page 2)
after 10 seconds
scrren 3 (like if I click on page 3)
.
.
.

It should work with forcing JavaScript to fire the next page-event
after 10 seconds, but do not know exactly.

Thanks a lot.
radioon.
James J [MSFT] - 30 Aug 2006 19:14 GMT
I was able to acheive the desired effect using JavaScript

Update your body tag with the following:
<body onload="setTimeout('PageDataGrid()', 10000)">

Add the following script:
<script type="text/javascript">
<!--
   function PageDataGrid()
   {
       try
       {
           // Find 'Next-Page' link
           var grid = document.getElementById("dataGrid");
           var cell = grid.firstChild.lastChild.firstChild.lastChild;
           
           // Simulate click
           cell.click();
       }
       catch(err)
       {
           alert("Error occurred: " + err.Message);
       }
   }

//-->
</script>

Signature

James Johansen, Longhorn SDK
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--------------------

>From: gellert@gmx.at
>Newsgroups: microsoft.public.dotnet.languages.csharp
[quoted text clipped - 7 lines]
>Content-Type: text/plain; charset="iso-8859-1"
>X-Trace: posting.google.com 1156594537 26277 127.0.0.1 (26 Aug 2006
12:15:37 GMT)
>X-Complaints-To: groups-abuse@google.com
>NNTP-Posting-Date: Sat, 26 Aug 2006 12:15:37 +0000 (UTC)
>User-Agent: G2/0.2
>X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
.NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR
2.0.50727),gzip(gfe),gzip(gfe)
>Complaints-To: groups-abuse@google.com
>Injection-Info: h48g2000cwc.googlegroups.com; posting-host=217.116.178.218;
>   posting-account=tnarpw0AAAAgQvwM-hRJegr6J779QuN3
>Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTFEEDS01.phx.gbl!newsfeed.c
w.net!cw.net!news-FFM2.ecrc.de!newsfeed.gamma.ru!Gamma.RU!postnews.google.co
m!h48g2000cwc.googlegroups.com!not-for-mail
>Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.languages.csharp:425571
>X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
[quoted text clipped - 22 lines]
>Thanks a lot.
>radioon.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.