System.Data.DataRowView

  • Thread starter Thread starter André Almeida Maldonado
  • Start date Start date
A

André Almeida Maldonado

Why when I execute this code, my DropDownList is populated with the value
"System.Data.DataRowView"????

See the code:


cmdCommand.CommandText = "SELECT UsuaNome FROM usuarios"

dapAdapter.SelectCommand = cmdCommand 'dapAdapter is a DataAdapter
dapAdapter.Fill(dtsDataSet, "Usuarios")

drpLigaAten.DataSource = dttUsuarios 'dttUsuarios is a DataTable
drpLigaAten.DataBind() 'drpLigaAten is a DropDownList


Thank's
 
André,
When binding to a DataTable, you need to set the DataTextField &
DataValueField properties, to the field to display & the field to return
respectively.

Hope this helps
Jay
 
Hy Jay... Sorry, but I'm beginner....

Can you give me more details or a web page that explain it???

Thank you.
 
Back
Top