+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Custom Field Control Data Type

Custom Field Control Data Type

3 posts, 0 answered
  1. Rico
    Rico avatar
    88 posts
    Registered:
    30 Aug 2012
    20 Mar 2013
    Link to this post
    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!
  2. Arno
    Arno avatar
    249 posts
    Registered:
    08 Sep 2010
    20 Mar 2013 in reply to Rico
    Link to this post
    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.
  3. Rico
    Rico avatar
    88 posts
    Registered:
    30 Aug 2012
    22 Mar 2013 in reply to Arno
    Link to this post
    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.
3 posts, 0 answered