[FIXED] [1.0] ComboBox should implement IEditableTextControl

  1. #1

    [FIXED] [1.0] ComboBox should implement IEditableTextControl

    ComboBox doesn't currently implement IEditableTextControl, which means that it can't be used inside of many ASP.Net controls' ContentTemplates where specific named controls are required.

    For example, an Ext:ComboBox can't be used for the "Question" field of a CreateUserWizard.ContentTemplate. Trying to do so gives:
    cuw1: CreateUserWizardStep.ContentTemplate does not contain an IEditableTextControl with ID Question for the security question, this is required if your membership provider requires a question and answer.
  2. #2

    RE: [FIXED] [1.0] ComboBox should implement IEditableTextControl

    It should also support ITextControl.

    ... and I'm guessing that a lot of other Coolite control should also support these two interfaces.
  3. #3

    RE: [FIXED] [1.0] ComboBox should implement IEditableTextControl



    For now I am using the code below... although - I am not 100% sure about the Text.set logic.

        public class ComboBoxEx : Coolite.Ext.Web.ComboBox, IEditableTextControl, ITextControl
        {
            public event EventHandler TextChanged
            {
                add { base.ItemSelected+= value; }
                remove { base.ItemSelected-= value; }
            }
            public string Text
            {
                get { return base.SelectedItem.Text; }
                set
                {
                    // Find a matching item
                    for(int i = 0; i < base.Items.Count; ++i)
                    {
                        if(base.Items[i].Text == value)
                        {
                            base.SetValue(base.Items[i].Value);
                            return;
                        }
                    }
    
    
                    if(base.Editable)
                    {
                        base.SetValue(value);
                    }
    
    
                    throw new ArgumentException("Text can only be set to the value of an existing ListItem");
                }
            }
        }
  4. #4

    RE: [FIXED] [1.0] ComboBox should implement IEditableTextControl

    I have also attempted to template the createuserwizard section to use microsoft membership and roles. I want a consitent look and feel of extjs and I have discovered that without this support, this is not possible. Please support these simple interfaces for most of the base form controls for 1.0. They really only need the Value to Text property and the event substitution as listed above.

    So please support IEditableTextControl
  5. #5

    RE: [FIXED] [1.0] ComboBox should implement IEditableTextControl

    I'll have to look into what revisions were recently made to support these interfaces across more of the controls. If they were not added I'll ensure they are added right away to the v1.0 branch.

    I'll update this thread once I confirm the interfaces have been added.


    Geoffrey McGill
    Founder
  6. #6

    RE: [FIXED] [1.0] ComboBox should implement IEditableTextControl

    In the v1.0 release, the IEditableTextControl interface was added to the TextFieldBase class, so now all child components will inherit. Including Combobox, NumberField, SpinnerField, TextField, etc.

    Hope this helps.


    Geoffrey McGill
    Founder
  7. #7

    RE: [FIXED] [1.0] ComboBox should implement IEditableTextControl

    Fantastic! ... Thanks!
  8. #8

    RE: [FIXED] [1.0] ComboBox should implement IEditableTextControl

    Great. Now all I need is 1.0. ;)

Similar Threads

  1. Replies: 1
    Last Post: May 14, 2012, 1:40 PM
  2. [FIXED] [V0.7] ComboBox Bug
    By Timothy in forum Bugs
    Replies: 6
    Last Post: Nov 01, 2008, 12:32 PM
  3. [FIXED] [V0.7.0] ComboBox Bug
    By Timothy in forum Bugs
    Replies: 15
    Last Post: Oct 13, 2008, 12:09 PM
  4. [FIXED] [V0.7.0] ComboBox Bug
    By Timothy in forum Bugs
    Replies: 2
    Last Post: Oct 10, 2008, 11:59 AM
  5. [FIXED] [V0.6] ComboBox
    By Timothy in forum Bugs
    Replies: 7
    Last Post: Aug 26, 2008, 2:47 PM

Posting Permissions