Re: Unbound ComboBoxCellType - down arrow key does not work as intended

Posted by: chris-ong on 8 September 2017, 2:24 pm EST

  • Posted 8 September 2017, 2:24 pm EST

    Hello,


    I've created an unbound ComboBoxCellType which I copied from the sample code:


     


    FarPoint.Win.Spread.CellType.ComboBoxCellType cb = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
    cb.Items = (new String[] {"One", "Two", "Three", "Four", "Five", "Thousand", "Through"});
    cb.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows;
    cb.AutoSearch = FarPoint.Win.AutoSearch.MultipleCharacter;
    cb.Editable = true;
    cb.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
    cb.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;


    fpSpread1.ActiveSheet.Columns[0, 2].CellType = cb;


     


    When I entered these letters "Th" into the cell, the behaviour works as expected, i.e. "Three" is displayed in the cell with "ree" highlighed. Also the dropdown list displayed these 3 items "Three", "Thousand", "Through". However, I cannot use the Down Arrow key to move into the dropdown list and select the other items.


    I've set the AcceptsArrowKeys property to AllArrows as shown in the code above but that doesn't seem to work as expected. All it does is shifting through the 3 items in the cell rather than allow the Down Arrow key to move into the list.


     I would like to know if anyone experienced this and how to handle the Down Arrow key to work as expected.


    Thanks.

  • Replied 8 September 2017, 2:24 pm EST

    Hello Chris,


    You need to set AcceptsArrowKeys property to AllArrowsIgnoringMultiline and then you will able to make the selection out the possible selection using arrow keys.



                FarPoint.Win.Spread.CellType.ComboBoxCellType cb = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
                cb.Items = (new String[] { "One", "Two", "Three", "Four", "Five", "Thousand", "Through" });
                cb.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrowsIgnoringMultiline;
                cb.AutoSearch = FarPoint.Win.AutoSearch.MultipleCharacter;
                cb.Editable = true;
                cb.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
                cb.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;


                fpSpread1.ActiveSheet.Columns[0, 2].CellType = cb;


    Hope this will help you. Thanks.

  • Replied 8 September 2017, 2:24 pm EST

    Thanks Reeva. That's working exactly the way I expect it to be.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels