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!
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!