I can't send you a sample but here is a more accurate description of what I'm doing:
m_ControlField = New LookupListColumn("Control", "ControlField") --> ControlField is a NULL field
m_ControlField.FitMode = ColumnFitMode.SmartFit
m_ControlField.DropDownStyle = DropDownStyle.DropDownList
m_ControlField.LookupSource = dtEmp
m_ControlField.LookupBoundField = "Id"
m_ControlField.LookupDisplayField = "New"
dgParams.Columns.Items.Add(m_ControlField)
above, dtEmp is an empty datatable:
dt.Columns.Add("Id", GetType(System.Int32))
dt.Columns.Add("New", GetType(System.String))
row = dt.NewRow()
row(0) = DBNull.Value
row(1) = DBNull.Value
rc = dt.Rows
rc.InsertAt(row, 0)
Then, when I select a row in another grid, the m_ControlField column is updated accordingly in dgParams, by changing its datasource to a dataview:
dvCtrlFields = m_fields.GetCtrlSrcFields(dt, _
Convert.ToInt32(dt.Rows(m_SelectedControl).Item("FieldID")))
'Set up m_ControlField
m_ControlField = DirectCast(dgParams.Columns.Items(EParamFields.e_controlField), LookupListColumn)
m_ControlField.LookupSource = dvCtrlFields
m_ControlField.LookupBoundField = "FieldID"
m_ControlField.LookupDisplayField = "FieldName"
dgParams.Columns.Items(EParamFields.e_controlField) = m_ControlField
Unfortunately, with version 1.2 of the flygrid this doesn't work. m_ControlField remains empty, I can't select a value as if it was read-only and finally if I double click on the combobox I have the message:
Value cannot be null.
Please help me with this issue.