Kes,
As W.G. Ryan states:
Bind only the DataTable itself to the DataSource.
| Me.ddlMemType.DataSource = table
| Me.ddlMemType.DataTextField = ....
By setting the DataSource = table.TableName you were attempting to bind to a
String...
Hope this helps
Jay
"WebBuilder451" <(E-Mail Removed)> wrote in message
news:A80227C5-BDED-4960-9AFE-(E-Mail Removed)...
| thanks
| related question: i'm trying to bind this to a dropdown list
| i'm trying
| Me.ddlMemType.DataSource = table.TableName
| Me.ddlMemType.DataTextField = ....
| this does not work. how would i do this?
| thnaks
| kes
| --
| thanks (as always)
| some day i''m gona pay this forum back for all the help i''m getting
| kes
|
|
| "Jay B. Harlow [MVP - Outlook]" wrote:
|
| > kes,
| > Here is an example that I just posted in response to another question:
| >
| > Dim table As New DataTable("RJN")
| > table.Columns.Add("InstanceId", GetType(Integer))
| > table.Columns.Add("LevelId", GetType(Integer))
| > table.Columns.Add("ParentId", GetType(Integer))
| >
| > table.Rows.Add(New Object() {100, 1, Nothing})
| > table.Rows.Add(New Object() {101, 2, 100})
| > table.Rows.Add(New Object() {102, 3, 101})
| > table.Rows.Add(New Object() {103, 4, 102})
| > table.Rows.Add(New Object() {104, 5, 103})
| > table.Rows.Add(New Object() {105, 5, 104})
| > table.Rows.Add(New Object() {106, 5, 104})
| >
| >
| > The "problem" currently is that DataTable in .NET 1.0 & 1.1 (VS.NET 2002
&
| > 2003) do not support the ReadXml & WriteXml methods. I understand that
..NET
| > 2.0 (VS.NET 2005) will add support for these methods ot DataTable.
| >
| > Hope this helps
| > Jay
| >
| > "WebBuilder451" <(E-Mail Removed)> wrote in
message
| > news:1FE183E8-910B-45F6-A487-(E-Mail Removed)...
| > | I'd like to create a datatable and add rows to it, but not make it
part of
| > a
| > | dataset. so far i've not seen too many examples of this. I believe it
can
| > be
| > | done. does anyone know of an example?
| > | thanks
| > | kes
| > | --
| > | thanks (as always)
| > | some day i''m gona pay this forum back for all the help i''m getting
| > | kes
| >
| >
| >
|