Multiple issues

7 posts, 0 answers
  1. Christian
    Christian avatar
    21 posts
    Member since:
    May 2012

    Posted 27 Apr Link to this post

    Hello,

    I've multiple issues with the MultiColumn ComboBox:

    1) Filtering the ComboBox with CompositeFilterDescriptor on multiple columns:

    if the ComboBox is filtered and "return" is pressed, the selected/filtered values is only taken if the filter text represents the "DisplayMember" column.
    So if you have 2 I (ID & NAME) and DisplayMember is NAME and ValueMember is ID and a CompositeFilter like this

    RadMultiColumnComboBox1.AutoFilter = true;
    RadMultiColumnComboBox1.EditorControl.FilterDescriptors.Clear();
    CompositeFilterDescriptor compositeFilter = new CompositeFilterDescriptor();
    compositeFilter.FilterDescriptors.Add(new FilterDescriptor("ID", FilterOperator.StartsWith, ""));
    compositeFilter.FilterDescriptors.Add(new FilterDescriptor("NAME", FilterOperator.StartsWith, ""));
    compositeFilter.LogicalOperator = FilterLogicalOperator.Or;
    RadMultiColumnComboBox1.EditorControl.FilterDescriptors.Add(compositeFilter);

    you can search/filter for ID/NAME, but if you search for ID and then press "return" the item is not selected and the text becomes empty. If you do the same but search for a name the item will be selected if you press "return".

    I've managed to deal with this by overriding the ProcessReturnKey function, but then there is issue #2 left:

     

    2) Selecting a item by filtering and pressing "return" doesn't fire the SelectedIndexChanged-Event

    if you have the same circumstances as 1) and you filter and then select the item by pressing "return" the SelectedIndexChanged-Event is never fired. I think this has something to do with the handling and event suppressing in "RadMultiColumnComboBoxElement.SetCurrentRowOnReturnOrTabKey". (I didn't try it, but I think the other events (like SelectedValueChanged)  are neither fired.

     

    3) Filtering/Suggesting  is not working if the DropDownStyle is set to "DropDownList"

    If the DropDownStyle is set to DropDownList neither the filtering nor the suggesting is working (the suggesting kinda works but with odd/strange behavior)

     

    4)  Prevent the SelectedIndexChanged event when scrolling through items

    If you "scroll" through the displayed items (by keyboard) for every item the SelectedIndexChanged event is fired, makes no sense in most cases because the DropDown is still open, so is there any workaround? Or please implement the OnSelectionChangeCommitted Event.

     

    5) MultiColumn ComboBox has a different look as the DropDownList

    Using the Windows8-Theme the MultiColumn ComboBox Arrow looks different compared to the DropDownList
    Also the Arrow seems a bit blurry (compared to other controls/themes)
    I think there should be a uniform look across controls and themes (color / size / arrow symbol ) ... 

     

    Kind Regards,

    Christian

  2. Christian
    Christian avatar
    21 posts
    Member since:
    May 2012

    Posted 27 Apr Link to this post

    6) Item list becomes completely empty

    this has to do something with #1. If you enter a filter text which produces an empty item list (no matches) and then press "return", the dropdown closes, the text ist set to empty and if you open the dropdown again the list ist still empty. Since the text is also empty this makes no sense. To get back the full list, you have to enter some text and remove it by pressing backspace.

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 29 Apr Link to this post

    Hello Christian,

    Thank you for writing.

    1. I was not able to reproduce this. On my side, the text is updated correctly. This is why I have attached my test project. Could you please check it and let me know how it differs from your real setup? In addition, could you specify which version you are using?

    2. The SelectedIndexChanged is not fired when a composite filter is used. I have logged this issue in our Feedback PortalYou can track the item for status changes and add your vote for it here.

    To workaround this, you can use the DropDownClosed event and check if the value is changed.

    3. The AutoFilter functionality is not supported in this mode. The user cannot type in the text box, and can only select an item from the drop down.

    4. You can check if the drop down is opened:
    private void RadMultiColumnComboBox1_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (!radMultiColumnComboBox1.MultiColumnComboBoxElement.IsDropDownShown)
        {
            Console.WriteLine("This will be executed after the user selects an item");
        }
    }

    5. In this case, the arrow button has a different background. You can change it with the following code:
    radMultiColumnComboBox1.MultiColumnComboBoxElement.ArrowButton.Fill.BackColor = Color.White;
    radMultiColumnComboBox1.MultiColumnComboBoxElement.ArrowButton.Fill.GradientStyle = GradientStyles.Solid;
     
    6. I was able to reproduce this issue. I have logged it in our Feedback Portal as well. You can track the item for status changes and add your vote for it here.

    To workaround this issue you need to reset the filter:
    private void RadMultiColumnComboBox1_DropDownOpened1(object sender, EventArgs e)
    {
        if (radMultiColumnComboBox1.Text == "")
        {
            radMultiColumnComboBox1.EditorControl.FilterDescriptors.Clear();
            CompositeFilterDescriptor compositeFilter = new CompositeFilterDescriptor();
            compositeFilter.FilterDescriptors.Add(new FilterDescriptor("Drug", FilterOperator.StartsWith, ""));
            compositeFilter.FilterDescriptors.Add(new FilterDescriptor("Name", FilterOperator.StartsWith, ""));
            compositeFilter.LogicalOperator = FilterLogicalOperator.Or;
            radMultiColumnComboBox1.EditorControl.FilterDescriptors.Add(compositeFilter);
        }
    }

    Your Telerik Points have been updated for this reports.

    I am looking forward to your reply.

    Regards,
    Dimitar
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  5. Christian
    Christian avatar
    21 posts
    Member since:
    May 2012

    Posted 03 May in reply to Dimitar Link to this post

    Hello Dimitar,

    thank you for your help.

    1) Seems to be fixed in the newer versions

    3) But it would be nice if the control can support this. then it would be usable like the normale combobox. 

    4) But then the SelectedIndexChanged Event is not fired if the DropDown is closed. So I'd have to monitor all my ComboBoxes to check if the value has changed. This is no "RAD" behavior at all.

    5) this works, but then there are still differences (e.g. hover glow)

    6) *thumbs up* good workaround!

  6. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 03 May Link to this post

    Hello Christian,

    Thank you for writing back.

    3) The standard combo box cannot be filtered when the DropDownStyle is set to DropDownList. Pressing a key will select the item that starts with the pressed letter.

    4) The event will be fired when the drop down is closed as well. Could you please specify the exact case where this does not suit your requirement? 

    5) You can change the arrow buttons directly in the theme as well. This way all controls will have the same style. The following articles are showing how you can extract the predefined themes and edit them:
    I hope this will be useful. I am looking forward to your reply.

    Regards,
    Dimitar
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  7. Christian
    Christian avatar
    21 posts
    Member since:
    May 2012

    Posted 03 May in reply to Dimitar Link to this post

    Hello Dimitar,

    3) I'm aware of that, but why can't the MultiColumn ComboBox behave like that? No Filtering would be OK, but at least jump to the next matching entry (depending on the "DisplayMember" Column). At the moment the control sometimes jumps to an entry or does something strange

     

    4) In my case (using the newest version) the event is never fired when the dropdown is closing, it only is fired if the user picks one item or "scrolls" through the items. So by using your code and checking if the dropdown is opened, the inner code is never executed. (I used your example project and only modified the SelectedIndexChanged-Eventhandler

     

    5) I know that too, and I had a custom theme, but since the theme data is only partial XML and the rest is a serialized stream it is not possible to compare any changes between versions. So if there is a fix in the theme or theming for a new control is added, it is not possible to add this changes to the custom theme (technical it's possible but not in a short amount of time). This is why I gave up on making a custom theme.

    There are other controls which don't have a uniform look, e.g. why is the RadAutoCompleteBox by default higher (26px) than any other control of that kind? The RadCheckDropDownList uses the same way to display the checked items but has the normal control hight (20px). In my opinion all controls in a set like Teleriks should have a uniform look (and feel) 

     

    Kind Regards,

    Christian

  8. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 05 May Link to this post

    Hello Christian,

    Thank you for writing back.

    3) Thank you for your feedback. We will consider implementing such functionality. In addition, this can be easily implemented. For example, you can use the KeyPress event and set the selected value:
    private void RadMultiColumnComboBox1_KeyPress(object sender, KeyPressEventArgs e)
    {
        foreach (var item in radMultiColumnComboBox1.EditorControl.Rows)
        {
           
            if (item.Cells[radMultiColumnComboBox1.DisplayMember].Value != null)
            {
                string value = item.Cells[radMultiColumnComboBox1.DisplayMember].Value.ToString();
                if (value.StartsWith(e.KeyChar.ToString(), StringComparison.InvariantCultureIgnoreCase))
                {
                    radMultiColumnComboBox1.SelectedItem = item;
                    break;
                }
            }
        }
    }

    4) I have found the case where suggested approach is not working as expected. Please note that there are many ways for selecting an item, you cannot be sure when exactly the user has finished selecting. In addition, the main difference with the SelectionChangeCommitted is that this event is not fired when the index is changed in the code behind. You can distinguish between user changes and code changes by just using a flag.   

    5) I agree with you and we will strongly consider your feedback. Please note that you can use our Feedback Portal to share your observations. 

    Should you have any other questions do not hesitate to ask.

    Regards,
    Dimitar
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for WinForms is Visual Studio 2017 Ready