Re: Dual Combo box binding problem (relation involved)

From: Kevin Yu [MSFT] (v-kevy_at_online.microsoft.com)
Date: 04/30/04


Date: Fri, 30 Apr 2004 06:30:42 GMT

Thanks for Bill's quick response!

Hi Brian,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that when you bind comboboxes to data
source, it displays System.Data.DataRow instead of Correct values. If there
is any misunderstanding, please feel free to let me know.

Generally, this might be caused by incorrect binding of data. Would you
please try to use typed DataSet instead. Because when using typed DataSet,
we can ensure that correct schema has been created, which makes binding
much more easier. Please also try to set binding properties in the
following order to make sure that there will be no excption thrown.

Me.cboCoverageLine.ValueMember = "LineOfBusinessID"
Me.cboCoverageLine.DisplayMember = "Name"
Me.cboCoverageLine.DataSource = ds_formData.Tables("LinesOfBusiness")

Me.cboCoverageType.DisplayMember = "Name"
' Me.cboCoverageType.ValueMember = "CoverageTypeID"

HTH. If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."



Relevant Pages

  • Re: I really hate .NET especially inside Delphi
    ... Consume a webservice that exposes a typed dataset. ... But now try to drop it on a form - VCL or Winform. ... Winforms has the designers for binding to datasets. ... But you cant ...
    (borland.public.delphi.non-technical)
  • Re: accessing fields in typed dataset
    ... I'm using a BindingManagerBase and binding context with the ... .AddNew() (which is supposed to automatically create new row on datatable ... 'NewXXXXTableRow' property of the typed dataset to get a handle to the new ... but any assignments I try to do on columns there give me Invalid Casts ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: typed DataSet-bound DataGrid sorting
    ... Yea that seems to be the problem because binding to a typed dataset happens ... I just dragged and dropped a DataView object to the page and ... I tried setting the Sort property of the ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)

Loading