Hi,
I am in the web.
The code is:
Protected WithEvents dgrdTitles As
System.Web.UI.WebControls.DataGrid
Dim sqlConnectionString As String =
System.Configuration.ConfigurationSettings.AppSett ings
("ConnectionString")
Private Sub Page_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load
Dim conObj As SqlConnection
Dim cmdSelect As SqlCommand
Dim dtrAlerts As SqlDataReader
' Retrieve records from database
conObj = New SqlConnection(sqlConnectionString)
conObj.Open()
cmdSelect = New SqlCommand("spSelectDetails",
conObj)
cmdSelect.CommandType = CommandType.StoredProcedure
dtrAlerts = cmdSelect.ExecuteReader()
dgrdTitles.DataSource = dtrAlerts
dgrdTitles.DataBind()
dtrAlerts.Close()
conObj.Close()
End Sub
Should I make endless loop and call DataBind ?
Thank you.
-----Original Message-----
Just use the Datasource and reset it to the new
dataTable. Are you inWinforms or the Web? If the web, you'll need to call
DataBind afterward.
Let me know if you have any problem.
Bill
"Dudi Nissan" <du***@e-gold.co.il> wrote in message
news:0d****************************@phx.gbl... Hi,
Yes. That is exactly what I mean.
How can I rebind the grid ?
Thank you.
>-----Original Message-----
>You'll need to requery the DB every 30 seconds then if
you mean getting the >latest updates from the DB by refresh. Once you rerun
your query, rebind >the grid.
>"Dudi Nissan" <du***@e-gold.co.il> wrote in message
>news:0b****************************@phx.gbl...
>> Hi
>>
>> I need to display DataGraid that refresh automatic
>> every 30 seconds ?
>>
>> Thank you.
>>
>
>
>.
>
.