Hello,
We have a grid with more than 100 columns. And we are trying to use the 'FieldChooser' dialog to enable user to choose a field. However, there is no 'search' functionality in that particular dialog. We would like to add a XamComboBox, which allows auto complete, where users can put couple of letters to choose from and the list of fields will be updated based on the user search. We took the generic style for FieldChooser and start updating but so far could not get the functionality that we would like to have. Can you please let us know how to get this functionality to the FieldChooser?
<DockPanel Visibility="{TemplateBinding FieldGroupSelectorVisibilityResolved}" > <editors:XamCheckEditor x:Name="toggleAllCheckBox" DockPanel.Dock="Left" IsThreeState="false" Value="{Binding Path=AllCurrentFieldsVisible, RelativeSource={x:Static RelativeSource.TemplatedParent}, Mode=TwoWay}" Visibility="{Binding Path=DisplayHiddenFieldsOnly, RelativeSource={x:Static RelativeSource.TemplatedParent}, Converter={StaticResource NotBoolToVisConverter}, Mode=OneWay}" Margin="4,0,0,0" /> <!--This is the combobox that we implemented which is shown for field group selectors.--> <ig:XamComboEditor x:Name="fieldGroupSelector" DockPanel.Dock="Right" ItemsSource="{TemplateBinding CurrentFields}" HorizontalAlignment="Stretch" DisplayMemberPath="Field.Name" OpenDropDownOnTyping="True" SelectedItem="{Binding Path=SelectedField, RelativeSource={x:Static RelativeSource.TemplatedParent}, Mode=TwoWay}" /> </DockPanel>
Hello Murat,
Thank you for your post. I have been looking into and I created a sample project for you with the functionality you want. Basically I added a TextBox above the ListBox that contains the Fields in the FieldChooser. I also handled its TextChanged event and in the handler I set the visibility, of the items that doesn’t contains the text, to Collapsed. You can also use this logic as a base in order to replace the TextBox with a ComboBox or other con troll of your choice.
Hope this helps you.
Hello Stefan,
Can you please verify that you can type into that textbox? Also try it with some databound to the grid.
Best regards,
Murat.