combobox DataSource DisplayMember problem



hi,

i have a simple table that i access in code, and connect it to a combobox
with setting the DataSource, and DisplayMember properties with the following
code,

cmbNames.DataSource = mDs.Tables("tblNames")

cmbNames.DisplayMember = "Names"

the data get loaded into the combobox, i see it by opening the combo, and
can pop it into the text portion by clicking on any item..

however if i use 'cmbNames.Items(x) to retrieve the data at a certain
location it returns "System.Data.DataRowView", instead of the name stored
there. why is this? and what can i do to get the data from location x in the
Items collection?

thanks

ray






.



Relevant Pages

  • Re: Bindinglist und DataGridView
    ... Jetzt binde ich die BL_Kategorien an eine ComboBox ... Und an SelectedValue wird ein weiterer CurrencyManager angehängt, ... Ein DataGridist bindet ebenso an eine eigene DataSource. ... Nun sollte nun mit der DataGridViewComboBoxColumn gleiches wie bei der ...
    (microsoft.public.de.german.entwickler.dotnet.datenbank)
  • Re: Using a ComboBox selection to fill in other fields in form
    ... > The Name of the Combo Box is 'Item1Desc' It's DataSource is also ... > The name of the TextBox to be filled in is "Item1Rate". ... that is what the ComboBox and the field in the table used ...
    (microsoft.public.access.forms)
  • Re: ComboBox-DataSource ersten Wert nach Eingabe nicht automatisch setzen
    ... Liste gefiltert und die DataSource der ComboBox auf die gefilterte ... Private CBO As ComboBox ... End Sub ...
    (microsoft.public.de.german.entwickler.dotnet.vb)
  • Re: Call Back - Bloß wie?
    ... Natürlich sind DataSource für das Grid und die Comboboxen ... Die Combobox, welche in einer Zelle des Grids residiert ist an die ... Tabelle (table1) an, welche mit Table2 verknüpft ist. ...
    (microsoft.public.de.german.entwickler.dotnet.vb)
  • Re: Typecasting
    ... OK, its not complaining about accessing the DataSource property of the combobox, it complaining that the thing you are passing to Fill is typed as an object not a DataTable. ... Data can de entered programatically, by loading an XML document in or by using a DataAdapter. ...
    (microsoft.public.dotnet.languages.csharp)