Update a DataGrid programatically

  • Thread starter Thread starter mg
  • Start date Start date
M

mg

How can I update a DataGrid programatically [that is,
without using code in a button event handler or page_load]
in a downloaded WebForm so that the DataGrid reflects the
latest contents of the DB relational table to which it's
bound.

I also don't want to use

<SCRIPT language="javascript">
document.location.reload()
</SCRIPT>

becauses it forces the end user to click a "retry" button
in a dialog using his/her mouse.
 
I'm not certain, but I think that you're talking about what was called a
dynamic cursor in classic ADO, where you would see additions and deletions
to the table by other users.

If that's what you want, I'm afraid that you won't get it in ADO.net.
Dynamic cursors require server side cursors and a connection to the server.
ADO.Net was designed on the disconnnected model, and doesn't know about
server side cursors. The best that you can do with ADO.Net is to requery
the back end periodically.

Thanks,

Russ Gray
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top