Hello
I have a read only column with dates in my XamGrid. Is there any way to use a DateColumn (with all the benefits like Filters) and show the date as text, without the DatePicker ?
Alternately can I use a different column type and use the dates filters on it ?
thank you!
Hello Lukasz,
Thank you for your post!
I have been looking into your issue. What I can suggest is to take a look at the following forum thread, where similar issue is discussed: http://ko.infragistics.com/community/forums/t/83842.aspx.
Please do not hesitate to let me know if you have any further questions on this matter.
Thank you!
I think I have done something similar:
<ig:TemplateColumn Key="end_date" IsFilterable="True" HeaderText="End Date" IsReadOnly ="True" > <ig:TemplateColumn.FilterColumnSettings> <ig:FilterColumnSettings > <ig:FilterColumnSettings.RowFilterOperands > <ig:EqualsOperand/> <ig:DateTimeAfterFilterOperand/> <ig:DateTimeBeforeFilterOperand/> <ig:DateTimeTodayFilterOperand/> <ig:DateTimeTomorrowFilterOperand/> <ig:DateTimeYesterdayFilterOperand/> </ig:FilterColumnSettings.RowFilterOperands> </ig:FilterColumnSettings> </ig:TemplateColumn.FilterColumnSettings> <ig:TemplateColumn.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Path=end_date}" VerticalAlignment="Center" Margin="5,0,0,0" /> </StackPanel> </DataTemplate> </ig:TemplateColumn.ItemTemplate> <ig:TemplateColumn.FilterEditorTemplate> <DataTemplate> <DatePicker SelectedDate="{Binding Value.end_date, Mode=OneWay}"/> </DataTemplate> </ig:TemplateColumn.FilterEditorTemplate> <ig:TemplateColumn.FilterItemTemplate> <DataTemplate> <DatePicker SelectedDate="{Binding Value.end_date, Mode=OneWay}"/> </DataTemplate> </ig:TemplateColumn.FilterItemTemplate> </ig:TemplateColumn>
It almost does the job with exception to the filtering parameter. The selected date does not applies to
<ig:EqualsOperand/> <ig:DateTimeAfterFilterOperand/> <ig:DateTimeBeforeFilterOperand/>
operands.
Thank you,
Lukas