Can you have a grid with a column that has different types of editors in each cell?
Example:
Col 1 = Features.
Each cell would have either a Dropdown list, a Checkbox or a text box depending on a 2nd hidden columns type value.
Thanks in advance.
Deasun
Note! VB.net
Hello,
You can specify an editor for an individual cell. The Using Different Editors in Individual Cells topic in the help has code to demonstrate this.
Alan
Thanks for the reply.
Got it working somewhat after reading that doc.
Current issue is that the checkbox items wont appear checked off or not.
Their in the intermeidate setting it seems.
Code:
'Create the Settings Object:Dim theSettings As New Infragistics.Win.UltraWinEditors.DefaultEditorOwnerSettings'as well as the Editor Owner:Dim theOwner As New Infragistics.Win.UltraWinEditors.DefaultEditorOwner(theSettings)Dim theEditor As Infragistics.Win.EmbeddableEditorBase = NothingDim theValue As Object = e.Row.Cells("Type").Value
Select Case e.Row.Cells("Type").Value Case "DDL" theSettings.DataType = GetType(String) theEditor = New Infragistics.Win.EditorWithCombo(theOwner) Case "ChkBox" theSettings.DataType = GetType(Boolean) theEditor = New Infragistics.Win.CheckEditor(theOwner) If (e.Row.Cells("Value").Value = "False") Then DirectCast(theEditor, Infragistics.Win.CheckEditor).CheckState = CheckState.Unchecked Else DirectCast(theEditor, Infragistics.Win.CheckEditor).CheckState = CheckState.Checked End If DirectCast(theEditor, Infragistics.Win.CheckEditor).Text = e.Row.Cells("Feature").Value Case Else theSettings.DataType = GetType(String) theEditor = New Infragistics.Win.EditorWithText(theOwner) e.Row.Cells("Feature").Value = e.Row.Cells("Value").Value End Select 'Assign it to the Cell.Editor e.Row.Cells("Feature").Editor = theEditor