datagrid paging automatically (after 10 seconds)

  • Thread starter Thread starter gellert
  • Start date Start date
G

gellert

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.
 
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 address 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: <[email protected]>
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: (e-mail address 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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top