aspnet & adonet question

  • Thread starter Thread starter MattB
  • Start date Start date
M

MattB

In my asp.net (vb) application I'm displaying data from a table in a
dataset in a listbox. The data displays as I want using the .DataTextField
property, but when the user makes a selection I need to return more than one
value in a row. This is because the data has a compound key on three fields
(department, category, and item).
I tried setting the DataValueField to "department" & "category" & "item"
but that errored out because:
DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with
the name departmentcategoryitem

So I guess I need to figure out how to return the values of three fields OR
create a view that concatenates those fields into one that I could parse out
again later. BUT, I don't know how to create a view in this context
(ado.net/vb.net). Can someone tell me which way might work better (or at
all) and some tips on making it work? TIA!
 
In answer to my own question, I'm just going to get the index of the select
item and then grab those values from the dataset table using the index and
col names. If there's a much easier way LMK, but this shouldn't be too hard!
 
Back
Top