Hey Cor/CJ/William - Continuation of 2 Forms Data

  • Thread starter Thread starter MadCrazyNewbie
  • Start date Start date
M

MadCrazyNewbie

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
 
Hi Mad,

Please stay in the original thread, there I have changed some of your code
and you should be almost there, although it is again another solution for
the same problem.

Cor
 
Sorry Cor, I didn`t think it had posted as i couldn`t see it, well infact
still carn`t but i can see yours:)

Ta
Si
 
Hi Herfried,

Did you not see you was not allowed to answer.

I am as well not happy with this post, I should have mentioned it in my
first answer, however this is a tricky part I am in now.

The first sentence is not serious.

Cor
 
Sorry to All in the group, i didn't mean to offend anyone.

I couldn't see my post in my previous thread, apologies to all no offence
meant.

Ta
MCN
 
Hi Simon,

For me this is no problem at all, mistakes are good lessons as CJ always
says.

Cor
 
What is it with you?

*Please post in the newsgroup so all can benefit*

aren't these some of your words? =)
 
Hi CJ,

Has to do with the subject, it had to be

Hey Cor/CJ/William/Herfried

I think however even better

Hey Herfried/Herfried/Herfried/Herfried/Herfried/Herfried/

No I am only kidding, personal adresses to persons should be avoided I agree
that with Herfried.

However mistakes are possible.

Cor
 
Cor Ligthert said:
Hi CJ,

Has to do with the subject, it had to be

Hey Cor/CJ/William/Herfried

I think however even better

Hey Herfried/Herfried/Herfried/Herfried/Herfried/Herfried/

hah!

No I am only kidding, personal adresses to persons should be avoided I agree
that with Herfried.

I agree to a point, but simon asks good questions that are answered here a
lot, maybe people can read them and get ideas without asking...agian that
is...
 
* "Cor Ligthert said:
Has to do with the subject, it had to be

Hey Cor/CJ/William/Herfried

I think however even better

Hey Herfried/Herfried/Herfried/Herfried/Herfried/Herfried/

No, better: "Hey *.*" ;-).
No I am only kidding, personal adresses to persons should be avoided I agree
that with Herfried.

However mistakes are possible.

Maybe I forgot the ";-)"...
 
Back
Top