• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 337
  • Last Modified:

autosave

Hi together,

is it possible to implement a trigger or sth else which sends on client side all data displayed in several gridviews to the server for example all 30 minutes?

thanks in advice
0
Gaiala
Asked:
Gaiala
  • 2
1 Solution
 
CutSackCommented:
Hi Gaiala,

You could juse Javascript on the client page to force the page to submit every 30 minutes using a setTimeout command.

Then in your code behind you would process the grid data to do the update.
function init()
{
    setTimeout("submitPage();", 1800000);  // 1800000 ms = 30 mins
}
 
function submitPage()
{
    // some code here if needed to do anything first
    document.form1.submit();
}
 
Then in your body tag on the page:
 
<body onload="init();">
 
Then in the code behind:
 
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
 
        If Page.IsPostBack Then
 
            GridUpdateFunction()    ' Call whatever function here to update the database.
 
        End If
 
    End Sub

Open in new window

0
 
GaialaAuthor Commented:

How can I get the data from a programmatically created Gridviews?
0
 
CutSackCommented:
Hi Gaiala,

How are the GridViews initially populated? Is it via a DataSet or DataAdapter or some other means?
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now