RE: how to display data in textboxes ?
From: Kempton (Kempton_at_discussions.microsoft.com)
Date: 07/08/04
- Next message: Richard Thombs: "Re: Application quit when i set ProgressBar.Minimum and ProgressBar.Maximum with the same value"
- Previous message: Khanh: "Re: Application quit when i set ProgressBar.Minimum and ProgressBar.Maximum with the same value"
- In reply to: chris: "how to display data in textboxes ?"
- Next in thread: chris: "RE: how to display data in textboxes ?"
- Reply: chris: "RE: how to display data in textboxes ?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 7 Jul 2004 18:49:01 -0700
I think you can try:
TextBox2.text = dt.rows.Item(0).Item("JobID")
and so on.
I assume that there is only one record that matches.
Kempton
"chris" wrote:
> i'm trying to display the data into the textboxes when the user enters the appropriate id in the search textfield, however, it keeps on displaying an error message such as the following on my pocket pc
>
> An unhandled exception of type 'System.ArgumentNullException' occurred in System.Windows.Forms.dll
>
> Additional information: ArgumentNullException...
>
> My codes are such as below.My web services was ok..when i enter the number, it works fine..
> Private Sub Search2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Search2.Click
> Dim sID As Integer
> sID = Convert.ToInt32(TextBox1.Text)
> Dim ws As New servername.Service1
> Dim ds As DataSet = ws.GetJobID(sID)
> Dim dt As DataTable = ds.Tables("Jobs")
> TextBox2.DataBindings.Add("Text", dt, "JobID")
> TextBox3.DataBindings.Add("Text", dt, "JobNumber")
> TextBox4.DataBindings.Add("Text", dt, "JobName")
> End Sub
>
>
>
- Next message: Richard Thombs: "Re: Application quit when i set ProgressBar.Minimum and ProgressBar.Maximum with the same value"
- Previous message: Khanh: "Re: Application quit when i set ProgressBar.Minimum and ProgressBar.Maximum with the same value"
- In reply to: chris: "how to display data in textboxes ?"
- Next in thread: chris: "RE: how to display data in textboxes ?"
- Reply: chris: "RE: how to display data in textboxes ?"
- Messages sorted by: [ date ] [ thread ]