How do you reset the field chooser when clearing customizations in the XamDataGrid? If a record's field’s visibility is modified by the end user clearing customizations does not reset the filed visibility only the field order may change. Is there a workaround or a method of resetting the field visibility in the field chooser?
Subscribing to the FiedlChooserOpening event works well for my situation. Thank you.
Hello,
The Fields Visibility shouldn’t be affected by ClearCustomizations since it hasn't been categorized as one.
One way of doing this is to set the FieldChooser's AllCurrentFieldsVisible to either true or false. You can this two ways:
on perhaps a button click:
FieldChooser temp = new FieldChooser();
temp.DataPresenter = xamDataGrid1;
temp.AllCurrentFieldsVisible = true;
or using the xamDataGrid's FieldChooserOpening event:
e.FieldChooser.AllCurrentFieldsVisible = true;
Hope this is what you needed.
Sincerely,
Petar Monov,
DS Engineer,
Infragistics Bulgaria
I have tried setting the FieldChooser's DataPresenter to null, clearing all customizations to the grid and then resetting the Datapresenter for the FieldChooser back to the grid. This did not change the field visibility. The visibility of the fields do not revert to the original layout values. Is it possible that I misunderstood how to reset the FieldChooser?
Hi CRodacker,
It should happen automatically so it sounds like a bug. However one way you can have the field chooser refresh is by setting its DataPresenter to null and then restore it back.
Hope this helps,
Sandip