Is there a way to data bind the IsFixed property?
I am data binding my grid to a collection:
<igDP:XamDataGrid x:Name="XamDataGrid1" DataSource="{Binding TakeoutRecords}" .... />
I want some of the records to be fixed at the top of the grid, specifically when IsOverdue is true.
Thanks
Hello Phillip,
Thank you for your post. I have been looking into it and I can say that the Record object is not a visual element and the IsFixed Property is not Dependency Property, so it cannot be bound.
Hope this helps you.
Could you offer a suggestion as to how I could arrange for overdue records to be automatically fixed?
You can handle the XamDataGrid’s InitializeRecord event and use the code from this link:
http://help.infragistics.com/Help/NetAdvantage/WPF/2013.1/CLR4.0/html/xamDataPresenter_Fix_Records.html
in order to fix the currently initialized Record. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Thank you.
By responding to the InitializeRecord, and calling RefreshSortPosition(), the records are arranged as desired.
private void Grid_InitializeRecord(object sender, Infragistics.Windows.DataPresenter.Events.InitializeRecordEventArgs e) { var data = e.Record as DataRecord; if (data == null) return; var model = data.DataItem as RecordViewModel; if (model == null) return; Grid.ExecuteCommand(model.Status == RecordStatus.Overdue ? DataPresenterCommands.FixRecordTop : DataPresenterCommands.UnfixRecord, data); data.RefreshSortPosition(); }
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.