I have a scenerio where when the user edits a record, the small icon of ‘modified record’ appears in the Record Selector area. After I save the changes (or even if I cancel the changes) and update the data source connected to the grid, that icon never goes away. Moreover, if the changes are successfully saved, the record remains highlighted, even though the active record has changed. After editing a few records, the grid looks like the picture attached. How do I fix it? I tried calling ExecuteCommand(DataPresenterCommands.CommitChangesToAllRecords) but that didn't work for me unless I was using it incorrectly.
HI,
Please let me know if you need further assistance regarding this issue.
Sincerely,
Matt
Developer Support Engineer
HI ,
You can wire up the FiedlLayoutintilizing event and set it there int count = 0;
private void xgrid1_FieldLayoutInitializing(object sender, Infragistics.Windows.DataPresenter.Events.FieldLayoutInitializingEventArgs e)
{
if (count == 0)
e.FieldLayout.FieldSettings.AllowRecordFiltering = true;
count++
}
else e.FieldLayout.FieldSettings.AllowRecordFiltering = false;
If you define your field layouts in Xaml and you can specify in the fieldsetting for each layout:. <igDP:FieldLayout >
<igDP:FieldLayout.FieldSettings>
<igDP:FieldSettings AllowRecordFiltering="True"/>
</igDP:FieldLayout.FieldSettings>
<igDP:FieldLayout.Fields>
<igDP:Field Name="Name"/>
<igDP:Field Name="Age"/>
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
Thank you. I have another question. In a hierachical data binding, how can I disable the filter showing up for the child records?
Here is a link on the various updatemodes:
http://help.infragistics.com/NetAdvantage/WPF/2012.2/CLR4.0/?page=InfragisticsWPF4.DataPresenter.v12.2~Infragistics.Windows.DataPresenter.UpdateMode.html
MattDeveloper Support Engineer
This helped thank you. I noticed I was using OnCellChangeOrLostFocus instead of OnUpdate. Is there a difference between the two? I used OnCellChangeOrLostFocus because I have CellClickAction="EnterEditModeIfAllowed".