Hi,
I want to have following feature in the attached sample, could you please help me out:
1. start test app
2.set Hobits cell as active
3.type "bc" (At this time I want to open the xamcomboeditor, and do the filtering based on "bc")
but from my observation, "b" is "eaten" by the datagrid, "c" works for combo.
Could you please help me?Thank you!
Hello,
Thank you for your post. I have been looking into it and the sample you have uploaded and I modified it, so now it works as you want. Basically I added a code for opening the dropdown of the XamComboEditor in the handler of the PreviewKeyDown event. I also commented out the e.Handled = true code. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
Hi again,
actually in our real application the style for those comobo style field are like following and after this modification, your codes doesn;t work any more because the xamcomboeditor was not in the visual tree.
could you please help me?
I have already attached new test project.
Thank you very much!
<dataPresenter:UnboundField Name="Hobits" AlternateBinding="{Binding Hobit}"> <dataPresenter:UnboundField.Settings> <dataPresenter:FieldSettings EditorType="{x:Type igEditors:XamTextEditor}"> <dataPresenter:FieldSettings.EditorStyle> <!--My changes on the style begin--> <Style TargetType="{x:Type igEditors:XamTextEditor}"> <Setter Property="EditTemplate"> <Setter.Value> <ControlTemplate TargetType="{x:Type igEditors:XamTextEditor}"> <igEditors:XamComboEditor ItemsSource="{Binding DataItem.Hobits}" SelectedItem="{Binding DataItem.Hobit}" Padding="1"/> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="Background" Value="{Binding Path=Background,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type dataPresenter:CellValuePresenter}}}"/> <Setter Property="BorderThickness" Value="0"/> </Style> <!--My changes on the style end--> </dataPresenter:FieldSettings.EditorStyle> </dataPresenter:FieldSettings> </dataPresenter:UnboundField.Settings> </dataPresenter:UnboundField>
I modified the sample further, so now it works as you want. Basically I used the Utilities class to get the XamComboEditor since the CellValuePresenter's Editor is XamTextEditor now. Please let me know if this helps you or you have further questions on this matter. Looking forward for your reply.
Thank you for the quick reply, it works in the sample project and I will try to adapt it into our real application to see if it works.
hi again,
I found a new problem and I didn't find the way to fix it.
here is the problem:
When I type any key, if the combo have the item, it will automatically set the item as selected, you will see it in your sample.
Do you have any idea to fix it?
Thank you!