Hello, i'm currently having an issue whereby my column will not sort A to Z, Z to A with this one "Source Return" field. The two other fields sort just fine, I'm assuming the reason this won't sort has something to do with the use of the "Unbound" control since that is the only visible difference. Can someone tell me if there is something specific I have to declare to resume a sorting function with an Unbound Field please? Thank you all so much.
<igDP:UnboundField Column="1" Row="0" Label="Source Return"> <igDP:Field.Settings> <igDP:FieldSettings CellValuePresenterStyle="{StaticResource TwoColumnStyle}" LabelWidth="125"/> </igDP:Field.Settings> </igDP:UnboundField>
<igDP:Field Column="2" Row="0" Name="SourceClientID" Label="Source Client ID"> <igDP:Field.Settings> <igDP:FieldSettings CellValuePresenterStyle="{DynamicResource PfxDataGridTextFieldCell}" LabelWidth="125"/> </igDP:Field.Settings> </igDP:Field>
<igDP:Field Name="FriendlyName" Column="3" Row="0" Label="Source Client Name"> <igDP:Field.Settings> <igDP:FieldSettings CellValuePresenterStyle="{DynamicResource PfxDataGridTextFieldCell}" LabelWidth="125"/> </igDP:Field.Settings> </igDP:Field>
You're not setting the BindingPath of the UnboundField so unless you are programatically setting the Value of the cells in that unbound field (e.g. in the InitializeRecord) then your unboundfield has no data to sort. What is displayed by the CellValuePresenter has no relation to the sort order.
I am setting the Binding Path to a proper value of my datasource and have different templates defined for cell value presenter based on a property value in datatrigger. Filtering works fine but not sorting. If I remove cellvalue presenter style sorting works.
Hi the issue was cactually with cellvaluepresenterstyle set, setting the fieldSettings for all fields generically under the layout like
<igDP:XamDataGrid.FieldSettings>
<igDP:FieldSettings
LabelClickAction="SortByOneFieldOnly"
LabelTextAlignment="Center"
AllowSummaries="False"
AllowEdit="False"
CellClickAction="SelectRecord"
AllowGroupBy="False"
AllowRecordFiltering="True"
FilterOperatorDropDownItems="None"
FilterCellEditorStyle="{StaticResource FilterComboStyle}"
LabelPresenterStyle="{StaticResource infragisticsNTBcHeaderStyle}"
CellHeight="25" />
</igDP:XamDataGrid.FieldSettings>
does not work. Instead I have set it explicitly on each and every field and got it working.