|
-
May 11th, 2005, 06:17 PM
#1
Thread Starter
Hyperactive Member
Filling ComboBox using Column property?
Is it possible to populate a ComboBox using the Columns property of a dataview? If so how?
Last edited by seidel1; May 15th, 2005 at 11:28 PM.
-
May 11th, 2005, 07:50 PM
#2
Re: Filling ComboBox using Column property?
Do you mean the column name?
-
May 11th, 2005, 08:12 PM
#3
Thread Starter
Hyperactive Member
Re: Filling ComboBox using Column property?
-
May 12th, 2005, 09:48 AM
#4
Thread Starter
Hyperactive Member
Re: Filling ComboBox using Column property?
Any recommendations on this?
-
May 12th, 2005, 12:43 PM
#5
Re: Filling ComboBox using Column property?
Sorry, missed out on this one earlier. I don't have the IDE open, but try looking for a columns collection's .Name property. If not in a dataview, it should exist in a dataset.
-
May 12th, 2005, 11:26 PM
#6
Thread Starter
Hyperactive Member
Re: Filling ComboBox using Column property?
Thanks Mendhak, I am making progress, but still missing one piece (I think)
Here's what I HAD
'cboFieldName.Items.Add("Student ID")
'cboFieldName.Items.Add("First Name")
'cboFieldName.Items.Add("Last Name")
'cboFieldName.Items.Add("Account Balance")
'cboFieldName.Items.Add("Employee")
Here's what I want...
cboFieldName.DataSource = m_dsStudents.Tables("Students")
cboFieldName.DisplayMember = "what goes here"
'From what I read the display member is looking for text. I want to pull the column headings. Any ideas?
-
May 13th, 2005, 02:44 PM
#7
Thread Starter
Hyperactive Member
Re: Filling ComboBox using Column property?
-
May 15th, 2005, 10:09 PM
#8
Thread Starter
Hyperactive Member
Filling ComboBox using Column property?
I have made some progress using:
For intIndex As Integer = 0 To m_dvStudents.Table.Columns.Count - 1
cboFieldName.Items.Add(m_dvStudents.Table.Columns(intIndex).ColumnName)
Next intIndex
But how do I use the "Value" of the Column vs the index?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|