I am currently facing an issue related to implement sorting and filtering on an unbound field,
The Unbound fied contains icons which is displayed based on datatriggers (similar approach in http://blogs.infragistics.com/blogs/josh_smith/archive/2008/09/06/display-multiple-icons-in-a-xamdatagrid-field.aspx). The issue is, on click of the label, sorting is not happening.
Is it an issue with the cellvaluepresenter unable to identify the icons?
Hello Milan,
I have modified the sample from the blog, so now you are able to sort the UnboundColum. Basically I set its BindingPath to a Property from the DataSource, so the XamDataGrid could sort it. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Hello,
In the sample Josh attached, there is no data in th UnboundField, so the XamDataGrid is not able to sort it. The Cells there just have visual elements.
So that means we would not be able to sort this Unbound field. correct?
Thank you for your post. I have been looking into it and the sample Josh attached in his blog and I can say that the result you get is expected, because the UnboundField that is used to show the icons doesn’t have Data and isn’t bound to any of the underlying object’s Properties. Also I can say that the sorting in the XamDataGrid relies on the Values in the Cells and since the Cells with the icons doesn’t have Cells, you are not able to sort them.
Hope this helps you.
Below is the sample code that I am using and need to enable sorting on this Unbound Field. There are two icons green.png & red.png that are shown based on triggers.
Issue is the sorting is not working.
<igDP:UnboundField Label="Type">
<
igDP:UnboundField.Settings>
igDP:FieldSettings AllowEdit="False" AllowGroupBy="True" AllowResize="False" AllowSummaries="False" LabelClickAction="SortByOneFieldOnlyTriState">
<igDP:FieldSettings.CellValuePresenterStyle>
Style TargetType="{x:Type igDP:CellValuePresenter}">
<!-- These triggers hide the icons that do not apply -->
......
</
Style>
igDP:FieldSettings.CellValuePresenterStyle>
igDP:FieldSettings>
igDP:UnboundField>