Hi, I have a control with a XamGrid which datasource is a class containing some properties and a collection of classes, the classes are:
Slide
Title (string)
Notes (string)
Comments (string)
SlidesData (observable collection of SlideContent)
SlideContent
Content (string)
I can set the grid to show correctly everything using TextColumn for the single properties, I've also set filters for all columns.
However, if I want to customize the Filter Operand for the columns, I've seen that I need to set a Template column instead.
But when I put a template column instead of a TextColumn the Filter ceases to function, I can write whatever I like and the filter does not filter.
So my question is What is wrong in my Template Column that the filter does not work?
These are the columns definitions:
<ig:XamGrid.Columns> <ig:TextColumn Key="Title" HeaderText="Title" IsReadOnly="True" KeyboardNavigation.IsTabStop="False"/> <ig:TextColumn Key="Notes" HeaderText="Notes}" IsReadOnly="True" KeyboardNavigation.IsTabStop="False"/> <ig:TextColumn Key="Comments" HeaderText="Comments" IsReadOnly="True" KeyboardNavigation.IsTabStop="False"/>
<ig:ColumnLayout Key="SlidesData"> <ig:ColumnLayout.Columns> <ig:TemplateColumn Key="Content" HorizontalContentAlignment="Stretch" HeaderText="Content"> <ig:TemplateColumn.ItemTemplate> <DataTemplate> <ScrollViewer FlowDirection="LeftToRight" Margin="0"> <TextBox Text="{Binding Content}" TextWrapping="Wrap" /> </ScrollViewer> </DataTemplate> </ig:TemplateColumn.ItemTemplate> <ig:TemplateColumn.FilterColumnSettings> <ig:FilterColumnSettings > <ig:FilterColumnSettings.FilteringOperand> <ig:ContainsOperand/> </ig:FilterColumnSettings.FilteringOperand> </ig:FilterColumnSettings> </ig:TemplateColumn.FilterColumnSettings>
</ig:TemplateColumn> </ig:ColumnLayout.Columns> </ig:ColumnLayout>
</ig:XamGrid.Columns>
And this is the grid filtering settings:
<ig:XamGrid.FilteringSettings> <ig:FilteringSettings FilteringScope="ChildBand" AllowFiltering="FilterRowTop" FilterRowHeight="22" /> </ig:XamGrid.FilteringSettings>
The filter on the child band does not apply and also it shows the Default value for the Content property in the filter cell.
If you have any clue
thank you in advance
Hello Sabrina,
Thank you for your post. I have been looking into it and I can say that you need to define ‘FilterEditorTemplate’ and ‘FilterItemTemplate’ for the TemplateColumn like it is explained here:
http://www.infragistics.com/community/forums/t/50942.aspx
http://www.infragistics.com/community/forums/t/79176.aspx
http://www.infragistics.com/community/forums/t/77282.aspx
I created a sample project for you with this approach. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
Hello,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.