Custom Field Control Data Type
Hi there,
I'd like to create a custom field control (the control will be a dropdownlist or radComboBox). I'm populating this control from the backend (a list of users). I'd like the dropdownlist to store the values of these items (the userIDs) as GUIDS and not strings. So in the admin backend area. How exactly do I enforce the designer of this custom field control to save the string values in the dropdownlist as GUIDs ??
I suspect it's something in the .cs file I have to do perhaps, but it's not working
[TypeConverter(typeof(ObjectStringConverter))]
public override object Value
get
if (this.RadComboBoxControl.Items.Count > 0)
return this.RadComboBoxControl.SelectedItem.Value;
else
return string.Empty;
set
if (value != null)
if (this.RadComboBoxControl.Items.Count > 0)
//this.RadComboBoxControl.SelectedItem.Value = value as string;
this.RadComboBoxControl.SelectedItem.Value = value as Guid; //this is what I'd like, but radcombobox gets confused
thanks!
Hi Rico,
I can't answer your question completely, but I would recommend to use (or at least start with) a standard ASP.NET DropDownList rather than a RadComboBox. I have had lots of problems using the latter in a custom field control.
Hi Arno,
Yes, I'm kinda having some issues with wiring up the client side events for this control. Thanks for your input. I might try to look at going back to the class asp dropdownlist if need be.