I am working on VB.Net. I have a sub form with a datagridview, that is being loaded with the criteria taken from another form. Hence this form is called with parameters. Here is the code that calls the sub form.
where ds is the dataset to fill the datagridview and rb is the string from a radio button on this form.
Dim frmHis As New frmHist(ds, rb)
Here is the code in the sub form.
Now, I need to refresh this sub form every -- minutes, depending on how the user wants it to be. For this I have given a NumericUpDown control to select the mins. All this works fine. But how do I refresh the dataset and the datagridview?
Public Sub New(ByVal datset As DataSet, Optional ByVal Head As String = "")
' This call is required by the Windows Form Designer.
gdatset = datset
grdHist.DataSource = datset.Tables(0)
' Add any initialization after the InitializeComponent() call.
Label1.Text = Head