Hey CJ/Cor/William,
Hope you could advise me a little again?
Now i`ve got in my Button Click Event on my first form(frmFaxs):
Dim LoadFaxMeterReadings As frmFaxMeterReadings()
LoadFaxMeterReadings.FaxID(BindingContext(dsFax, "Faxs").Position)
LoadFaxMeterReadings.Show()
(The Above tells me FAXID & Show are not members of System.Array)
On My Second form I have:
Public Property RowHolder() As DataRow
Get
Return RowHolder
End Get
Set(ByVal Value As DataRow)
RowHolder = Value
End Set
End Property
Public Sub New(ByVal Holder As DataRow)
Me.RowHolder = Holder
End Sub
Private Sub frmFaxMeterReadings_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MyBase.Load
mlLoading = True
'Start of Fill Datasets
Try
dsFaxMeterReadings.EnforceConstraints = False
Try
Me.odcFaxMeterReadings.Open()
'Fill Arciris Roles Datasets
Me.odaFaxMeterReadings.Fill(dsFaxMeterReadings)
Catch fillException As System.Exception
Throw fillException
Finally
Me.odcFaxMeterReadings.Close()
End Try
Catch eLoad As System.Exception
System.Windows.Forms.MessageBox.Show(eLoad.Message)
Finally
mlLoading = False
End Try
'End of Fill Datasets
End Sub
Im I understanding this or am I going about this totally wrongs?
Many Thanks
MCN
Cor Ligthert said:
Hi CJ,
As forever I did understand what you wrote in your earlier message of
course, however this was what Bill wrote and and I am afraid that Simon and
I are on the same level, because I do not understand this. (I did not want
to write this but for the sake of Simon you forced me to that).
In this thread
--------------------
DataRow dro = DataTable.Rows[dataGrid.SelectedRowIndex];
then pass dro to your new form. You can either create a property in the new
form, or create an overloaded constructor or function that takes a datarow
as a param and then bind to it.
---------------------
And this in the ADONET group which I do not understand either
---------------------
Private _RowHolder As DataRow
Public Property RowHolder() As DataRow
Get
Return _RowHolder
End Get
Set(ByVal Value As DataRow)
_RowHolder = Value
End Set
End Property
Public Sub New(ByVal _Holder As DataRow)
Me.RowHolder = _Holder
End Sub
Then, no form1 use Dim frm as New
SecondGridForm(DataTableName.Rows[DataGrid.CurrentRowIndex])
frm.ShowDialog ' or .Show() depending on your needs
Then, once it's set you can do whatever you want on frm. Howver, if you
need the value you'll have it via frm.RowHolder as long as you remember to
reference on the second form with me.RowHolder
---------------------
Maybe you can explain this to us something deeper in the context of the
question from Simon?
(To make it something clearer, I can bind a table (or mostly an Ilist) as a
dataasource to any control however how to bind a datarow to a complex
control that do I not know).
Cor