PC Review


Reply
Thread Tools Rate Thread

datagrid paging automatically (after 10 seconds)

 
 
gellert@gmx.at
Guest
Posts: n/a
 
      26th Aug 2006
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.

 
Reply With Quote
 
 
 
 
James J [MSFT]
Guest
Posts: n/a
 
      30th Aug 2006
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>

--
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: (E-Mail Removed)
>Newsgroups: microsoft.public.dotnet.languages.csharp
>Subject: datagrid paging automatically (after 10 seconds)
>Date: 26 Aug 2006 05:15:33 -0700
>Organization: http://groups.google.com
>Lines: 24
>Message-ID: <(E-Mail Removed)>
>NNTP-Posting-Host: 217.116.178.218
>Mime-Version: 1.0
>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-(E-Mail Removed)
>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-(E-Mail Removed)
>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
>
>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.
>
>


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
DataGrid Paging makes DataGrid Disappear smithb1028 Microsoft ASP .NET 7 28th Jan 2007 08:59 PM
DataGrid.Items.Count and DataGrid Paging... Green Start Button Microsoft ASP .NET 1 4th Aug 2005 08:40 PM
Combining numeric mode paging and nextPreview paging in datagrid Red Microsoft ASP .NET 1 12th Mar 2005 11:41 PM
datagrid paging - customising paging style wh1974 Microsoft ASP .NET 0 12th Jan 2005 03:48 PM
datagrid , SQL Reader and Paging... Datagrid disappears Roger Microsoft ASP .NET 0 28th Dec 2004 04:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:05 AM.