Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I been having trouble finding out a way to quary my dataset and take the results and put it in a listbox.

 

-----------------------------------

Function LoadDiscreps()

dsJobDiscreps.ReadXml("../Data/JobDiscreps.xml")

Dim tDs As DataSet

Dim aRow As DataRow() = dsJobDiscreps.Tables("Discrepancy").Select("Job_ID = '000'")

lstDesc.DataSource = aRow

lstDesc.DisplayMember = "Discrep_ID"

lstDesc.ValueMember = "Discrep_ID"

 

 

End Function

------------------------------------

 

This is what i tought i can do but i guess it isn't possible...I guess i just need a nudge in the right direction.

  • Leaders
Posted

I don't really get what you're trying to do since it seems like this would result in only a single value in the listbox but, you could set the RowFilter to "Job_ID='000'" and set your lstDesc data source to that and it should be fine.

 

Something like

Dim dv as DataView = dsJobDiscreps.Tables("Descrpancy").DefaultView
dv.RowFilter = "Job_ID='000'"

--tim

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...