This is a migrated thread and some comments may be shown as answers.

Combobox search result not visible

3 Answers 37 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Domantas
Top achievements
Rank 1
Domantas asked on 05 Oct 2015, 03:04 PM

I'm having problems with my combobox, when i press button (letter for element) I seek that corresponding element will highlight, which it does, however it is out of bounds.
I've attached picture, the hidden element is next after the last one visible that got highlighted, which is fine, however the user has to scroll a little bit more to actually see the element to which he was redirected to, how can I fix this?

                  Input = new RadComboBox                 {                 ID = "input_" + param.Name,                 EnableEmbeddedSkins = false,                 Skin = "Tabbed",                 AutoPostBack = true,                 Width = new Unit (100,UnitType.Percentage),                 Height = new Unit(100, UnitType.Percentage),                 DropDownCssClass = "Ellipsis",                 CssClass = "FullLength",                 MaxHeight = new Unit(220, UnitType.Pixel),                 CheckBoxes = Multiselect,                 EnableCheckAllItemsCheckBox = Multiselect //,ItemTemplate = CreateItemTemplate()                             };             Input.Style.Add ("margin-top", "5px");             Input.Style.Add ("margin-bottom", "5px");             if (!Multiselect)                 Input.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(input_SelectedIndexChanged);             else                 {                 Input.ItemChecked += new RadComboBoxItemEventHandler(Input_ItemChecked);                 Input.CheckAllCheck += new RadComboBoxCheckAllCheckEventHandler(Input_CheckAllCheck);                 }

3 Answers, 1 is accepted

Sort by
0
Domantas
Top achievements
Rank 1
answered on 05 Oct 2015, 03:48 PM
I found out that somewhere in the code there was a label added to combobox which is first element, after delete'ing it in html, it works fine, what would I need to change in the code so it would see as there is an extra element in the grid? I suppose it thinks there is elements.count-1 instead of elements.count, so it does that
0
Domantas
Top achievements
Rank 1
answered on 05 Oct 2015, 03:59 PM
I found out it is because of "EnableCheckAllItemsCheckBox"  attribute. I need it set to true, setting to false fixes the problem
0
Domantas
Top achievements
Rank 1
answered on 07 Oct 2015, 02:02 PM
I can manage to make the element visible (search by key pressed) just fine if i make the list in relative position, however if I do that, when the user opens the drop down the first element is skipped (scrollbar not at the top) and therefore is not visible to the user, as a result it solves the problem but creates another one.
Tags
ComboBox
Asked by
Domantas
Top achievements
Rank 1
Answers by
Domantas
Top achievements
Rank 1
Share this question
or