KnobblesSteed
New member
- Joined
- Oct 18, 2010
- Messages
- 4
- Programming Experience
- Beginner
Hi,
On the form, the user have to pick 4 different fields from combobox and then it will show into DataGridView
here the code..
-----------------------------------------------------------------------
Dim EmployeeInt As New AcoSDK.Employee017
DataGridView1.Columns.Add("id", "ID")
DataGridView1.Columns.Add("FName", "FName")
DataGridView1.Columns.Add("Name", "Name")
DataGridView1.Columns.Add(ComboBox1.Text, ComboBox1.Text)
DataGridView1.Columns.Add(ComboBox2.Text, ComboBox2.Text)
DataGridView1.Columns.Add(ComboBox3.Text, ComboBox3.Text)
DataGridView1.Columns.Add(ComboBox4.Text, ComboBox4.Text)
Dim n As Integer = DataGridView1.Rows.Add()
Do While (Error1 = 0)
DataGridView1.Rows.Item.Cells(0).Value = EmployeeInt.EmNumber
DataGridView1.Rows.Item.Cells(1).Value = EmployeeInt.EmFirstName
DataGridView1.Rows.Item.Cells(2).Value = EmployeeInt.EmName
DataGridView1.Rows.Item.Cells(3).Value = EmployeeInt. & ComboBox1.Text
DataGridView1.Rows.Item.Cells(4).Value = 'EmployeeInt.' + ComboBox2.Text
DataGridView1.Rows.Item.Cells(5).Value = "EmployeeInt." & ComboBox3.Text
DataGridView1.Rows.Item.Cells(6).Value = EmployeeInt.ComboBox4.Text
Error1 = EmployeeInt.NextKey(noIndex, True)
Loop
-----------------------------------------------------------------------
So, i've tried everything and still getting errors in those 4 ways
DataGridView1.Rows.Item.Cells(3).Value = EmployeeInt. & ComboBox1.Text
DataGridView1.Rows.Item.Cells(4).Value = 'EmployeeInt.' + ComboBox2.Text
DataGridView1.Rows.Item.Cells(5).Value = "EmployeeInt." & ComboBox3.Text
DataGridView1.Rows.Item.Cells(6).Value = EmployeeInt.ComboBox4.Text
please help me to have the correct syntax.
KSteed
On the form, the user have to pick 4 different fields from combobox and then it will show into DataGridView
here the code..
-----------------------------------------------------------------------
Dim EmployeeInt As New AcoSDK.Employee017
DataGridView1.Columns.Add("id", "ID")
DataGridView1.Columns.Add("FName", "FName")
DataGridView1.Columns.Add("Name", "Name")
DataGridView1.Columns.Add(ComboBox1.Text, ComboBox1.Text)
DataGridView1.Columns.Add(ComboBox2.Text, ComboBox2.Text)
DataGridView1.Columns.Add(ComboBox3.Text, ComboBox3.Text)
DataGridView1.Columns.Add(ComboBox4.Text, ComboBox4.Text)
Dim n As Integer = DataGridView1.Rows.Add()
Do While (Error1 = 0)
DataGridView1.Rows.Item.Cells(0).Value = EmployeeInt.EmNumber
DataGridView1.Rows.Item.Cells(1).Value = EmployeeInt.EmFirstName
DataGridView1.Rows.Item.Cells(2).Value = EmployeeInt.EmName
DataGridView1.Rows.Item.Cells(3).Value = EmployeeInt. & ComboBox1.Text
DataGridView1.Rows.Item.Cells(4).Value = 'EmployeeInt.' + ComboBox2.Text
DataGridView1.Rows.Item.Cells(5).Value = "EmployeeInt." & ComboBox3.Text
DataGridView1.Rows.Item.Cells(6).Value = EmployeeInt.ComboBox4.Text
Error1 = EmployeeInt.NextKey(noIndex, True)
Loop
-----------------------------------------------------------------------
So, i've tried everything and still getting errors in those 4 ways
DataGridView1.Rows.Item.Cells(3).Value = EmployeeInt. & ComboBox1.Text
DataGridView1.Rows.Item.Cells(4).Value = 'EmployeeInt.' + ComboBox2.Text
DataGridView1.Rows.Item.Cells(5).Value = "EmployeeInt." & ComboBox3.Text
DataGridView1.Rows.Item.Cells(6).Value = EmployeeInt.ComboBox4.Text
please help me to have the correct syntax.
KSteed
Last edited: