The new feature that allows administrators to manage the lists that their profile properties are based on is really nice. Unfortunaly this only applies to the List data type (DNNListEditControl). I have written several profile Edit Controls myself and use a couple from the 21 Five Industries folks that inherit DNNListEditControl and I wanted my admins to be able to edit these lists as well. This also applies to the Region and Country data types as they inherit from DNNListEditControl as well.
All the code to actually manage the list should work fine so all I did was change the code for the check to display the list editing UI. replaced the following code in the IsList property in EditProfileDefinition.ascx.vb.
Original Code:
Get
Dim _IsList As Boolean = False
Dim objListController As New ListController
Dim dataType As ListEntryInfo = objListController.GetListEntryInfo(PropertyDefinition.DataType)
If (Not dataType Is Nothing) AndAlso (dataType.ListName = "DataType") AndAlso (dataType.Value = "List") Then
_IsList = True
End If
Return _IsList
End Get
New Code:
Get
Dim _IsList As Boolean = False
Dim objListController As New ListController
Dim dataType As ListEntryInfo = objListController.GetListEntryInfo(PropertyDefinition.DataType)
If (Not dataType Is Nothing) AndAlso (dataType.ListName = "DataType") Then
Dim dataTypeType As System.Type = System.Type.GetType(dataType.Text, False, True)
If (dataType.Value = "List") OrElse dataTypeType.IsSubclassOf(GetType(DotNetNuke.UI.WebControls.DNNListEditControl)) Then
_IsList = True
End If
End If
Return _IsList
End Get
I havn't completely tested this yet but my initial testing has not turned up any problems.