WelshyWizard
IS-IT--Management
Hi all,
I have the following code populating a datagrid and also setting some of the columnstyle settings:
What I want to do is make cs4 (Grade) a combobox in the datagrid, with a list of available options... Is this easy to do? How can I adapt my code to do this?
Cheers
Today is the tomorrow you worried about yesterday - and all is well.....
I have the following code populating a datagrid and also setting some of the columnstyle settings:
Code:
SqlDataAdapter1.Fill(DsPlates1)
DgPlates.DataSource = DataView1
Dim ts1 As New DataGridTableStyle ' Table stlye
Dim cs0 As DataGridColumnStyle = New DataGridTextBoxColumn
Dim cs1 As DataGridColumnStyle = New DataGridTextBoxColumn
Dim cs2 As DataGridColumnStyle = New DataGridTextBoxColumn
Dim cs3 As DataGridColumnStyle = New DataGridTextBoxColumn
Dim cs4 As DataGridColumnStyle = New DataGridTextBoxColumn
ts1.MappingName = "Plates"
'ID
cs0.MappingName = "ID"
cs0.HeaderText = "ID"
cs0.Width = 75
'Length
cs1.MappingName = "Length"
cs1.HeaderText = "Length"
cs1.Width = 50
'Width
cs2.MappingName = "Width"
cs2.HeaderText = "Width"
cs2.Width = 40
'Thick
cs3.MappingName = "Thick"
cs3.HeaderText = "Thick"
cs3.Width = 40
'Grade
cs4.MappingName = "Grade"
cs4.HeaderText = "Grade"
cs4.Width = 75
ts1.GridColumnStyles.Add(cs0)
ts1.GridColumnStyles.Add(cs1)
ts1.GridColumnStyles.Add(cs2)
ts1.GridColumnStyles.Add(cs3)
ts1.GridColumnStyles.Add(cs4)
DgPlates.TableStyles.Add(ts1)
What I want to do is make cs4 (Grade) a combobox in the datagrid, with a list of available options... Is this easy to do? How can I adapt my code to do this?
Cheers
Today is the tomorrow you worried about yesterday - and all is well.....