Ribbon and editable ComboBox with DataTemplate problem
I have different problems with simple List<string> binding to a ComboBox inside a Ribbon.
When using a combination of IsEditable and DataTemplate, it throws System.Runtime.InteropServices.COMException:
<ribbon:RibbonComboBox
IsEditable="True"
IsTextSearchEnabled="True"
DisplayOptions="Normal,Simplified"
ItemsSource="{Binding ViewModel.FontNames, ElementName=MainPagePage}"
SelectedValue="{Binding ViewModel.SelectedFontFamilyName, Mode=TwoWay, ElementName=MainPagePage}">
<ribbon:RibbonComboBox.ItemTemplate>
<DataTemplate>
<TextBlock FontFamily="{Binding}" Text="{Binding}" />
</DataTemplate>
</ribbon:RibbonComboBox.ItemTemplate>
</ribbon:RibbonComboBox>
(Using Binding instead of x:Bind because this ComboBox is inside a RibboinItemHost). Same behavior with SfComboBox.
Not using DataTemplate works but does not display the text of the items. Being a list of strings, dont know if DisplayMemberPath is needed (same with a list of floats for a font size combobox).
Also having problems when using a normal editable WinUI ComboBox inside a Ribbon:
Clicking the editable part does not allow to enter text. Have to show the dropdown and then enter the text.
But even worse, SelectedValue/Item does not change nor fire the binded property set. Outside the Ribbon it works as expected (vanilla WinUI, havent tried SF).
Hi Razdev,
We were able to replicate the exception from our end. We will update further details regarding this in two business days (April 10th, 2024). We appreciate your patience until then.
Regards,
Sudharsan
Hi Razdev,
Issue 1: Exception occurs while setting ItemTemplate for RibbonComboBox.
Issue 2: Dropdown item content not shown while setting list of string as ItemsSource in RibbonComboBox.
We have confirmed the reported scenario is a defect and logged a bug report for the reported scenario. We will provide the fix in the weekly NuGet release on 30th April 2024.
You can track the status of this defect
using the following feedback link: https://www.syncfusion.com/feedback/52913/exception-occurs-while-setting-itemtemplate-for-ribboncombobox
If you have any more specification replication procedures or a scenario to be
tested, you can add it as a comment in the portal.
Please let us know if you need any further assistance.
Note: The provided feedback link is private, and you need to log in to view this feedback.
Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”
Issue 3: Editable part does not allow to enter text.
Issue 4: SelectedValue/Item does not change nor fire the binded property set.
We were unable to reproduce the reported issue on our end. Therefore, we have recorded a video and attached a sample below for reference. If there's any misunderstanding regarding the query, please modify our sample accordingly and revert to us with a reproducible issue or video. Your cooperation in this matter will greatly assist us in providing a prompt solution.
Regards,
Subashini M.
Attachment: RibbonComboBox_dd062e35.zip
Thanks!
About issues 3 and 4, I mean using "normal" WinUI ComboBox, not Syncfusion ones (SfComboBox or RibbonComboBox). But I understand that it will be irrelevant when yours are fixed. Anyway, I attach your sample using normal WinUI CombBox for your interest.
Attachment: RibbonComboBox_dd062e35_mod_00_122bb56a.zip
Hi Razdev,
Issue 3: Editable part does not allow to enter text.
Issue 4: SelectedValue/Item does not change nor fire the binded property set.
For issue 3, We have confirmed the reported scenario is a defect and logged a bug report for the reported scenario. As already informed, we will provide the fix in the weekly NuGet release on 30th April 2024.
You can track the status of this defect using the following feedback link: https://www.syncfusion.com/feedback/52913/exception-occurs-while-setting-itemtemplate-for-ribboncombobox
For Issue 4, we were unable to reproduce the reported issue on our end. Therefore, we have recorded a video and attached below for reference. If there's any misunderstanding regarding the query, please revert to us with a reproducible video. Your cooperation in this matter will greatly assist us in providing a prompt solution.
Regards,
Sudharsan
Attachment: SelectedValueIssue_9f443808.zip
Hi,
For issue 4 I mean:
- MS ComboBox
- ItemSource List<string>
- SelectedItem string or other simple value type
With FontFamily or other class types it works.
Here you have a video.
Thanks!
Attachment: SelectedValueIssue_MS_ComboBox_List_String_b3bdc5b7.zip
Hi Razdev,
We have confirmed the reported scenario is a defect and logged a bug report for the reported scenario. We will provide the fix in the weekly NuGet release on 07th May 2024.
You can track the status of this defect using the following feedback link: https://www.syncfusion.com/feedback/53122/selectedvalue-item-does-not-change-nor-fire-the-binded-property-set
If you have any more specification replication procedures or a scenario to be tested, you can add it as a comment in the portal.
Please let us know if you need any further assistance.
Note: The provided feedback link is private, and you need to log in to view this feedback.
Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”
Regards,
Sudharsan
Hi Razdev,
About issue 3 and 4, on further analyze with the reported issue. We suggest to set the property "AllowFocusOnInteraction" as true in MSComboBox control. It will resolve the issue. Please find the code snippet and modified sample below,
<ComboBox Header="Normal WinUI" IsEditable="True" IsTextSearchEnabled="True" DisplayMemberPath="Name" AllowFocusOnInteraction="True" SelectedItem="{Binding SelectedEmployee, Mode=TwoWay}" ItemsSource="{Binding MyList }"> </ComboBox> |
If you face the same issue, please let us know.
Regards,
Sudharsan
Attachment: ModifiedRibbonComboBox_eff5d6c1.zip
Working, thanks!
Hi Razdev,
We are glad that the provided response meets your requirement. Please let us know if you need further assistance. As always, we are happy to help you out.
Regards,
Sudharsan
Hi Razdev,
We would like to let you know that Essential Studio Weekly NuGet packages (v25.2.4) has been published in nuget.org with the fix for the issue “Exception occurs while setting ItemTemplate for RibbonComboBox”. Please let us know if you have any concerns in this.
Root cause:
The DisplayMemberPath property was set when IsEditable property was true in RibbonComboBox at our source level; this is the cause of the issue. Now, it has been resolved.
Regards,
Sudharsan
- 10 Replies
- 3 Participants
-
RA razdev
- Apr 7, 2024 06:29 PM UTC
- May 14, 2024 01:25 PM UTC