Hi Infragistics Team,
My Objective
- To reset the field chooser with all the fields been checked when the button is clicked
Currently i'm doing like this
private FieldChooser fieldChooser;
void ExtendedXamDataGrid_FieldChooserOpening(object sender, FieldChooserOpeningEventArgs e){fieldChooser = e.FieldChooser;
}
public void OnClick(){
fieldChooser.AllCurrentFieldsVisible = true;
Problem: its only able to work when the opening event is trigger. Is there any method to reset the field chooser directly?
Hello,
Do you mean you want to reset the FieldChooser before opening it? Before opening it for the first time, it has not been initialized, so it would be still null.
If you want to restore the visibility of all fields you can do:
foreach(var field in grid1.FieldLayouts[0].Fields) { field.Visibility = Visibility.Visible; }
Please note that when initializing the FieldChooser you may further customize it, so calling AllCurrentFieldsVisible will be on the customized collection of visible fields in the fieldchooser.
Please let me know if you have more questions about it.
Sincerely,
Tihomir TonevAssociate Software DeveloperInfragistics