ChildList Settings

The ChildList Settings component is only used by the ChildList component to customize various settings such as what tabs are visible. Changing any settings that differ from the default will create a user configuration that will be loaded each time the specific childlist loads so all your settings will automatically be applied.

Component Code

The first portion of the code section contains all the parameters and variables that are required to pass information between the ChildList and ChildList Settings components so it can properly function.

OnParametersSetAsync()

This method is called when the component initializes and is used to populate the SettingsColumnList variable and all other needed variables.

UpdateColumns(ChildListColumnInformation col, bool updatedValue)

This method is called when one of the column checkboxes is toggled. It will update the IsVisible property of the column in the SettingsColumnList.

SaveGridConfiguration()

This method is called when settings are saved. It’s purpose is to create XML that will contain all the settings and save it as a user configuration. The format of the XML matches the format of the FieldUX parameter and an example can be seen below.

<Field>
  <FieldDefinition>
    <ID>
      <AllowFiltering>Yes</AllowFiltering>
      <DefaultPageSize>50</DefaultPageSize>
    </ID>
    <Children>
      <ChildListColumnDefinition>
        <ID>
          <ColumnSequence>1</ColumnSequence>
          <XMLFieldName>CustomerID</XMLFieldName>
          <Subform>Data</Subform>
          <IsVisible>Yes</IsVisible>
          <ColumnHeader>ID</ColumnHeader>
          <ColumnWidth>10</ColumnWidth>
          <HorizontalAlign>Left</HorizontalAlign>
          <CellStyleName></CellStyleName>
          <DataFormat></DataFormat>
          <RenderDisplayAs></RenderDisplayAs>
          <XMLDisplayField></XMLDisplayField>
          <ImageHeight>100</ImageHeight>
          <ImageWidth>100</ImageWidth>
          <AlternateTextField></AlternateTextField>
        </ID>
      </ChildListColumnDefinition>
    </Children>
  </FieldDefinition>
</Field>

RestoreDefaultGridSettings()

This method is called when the Restore Default Settings button is selected. Its purpose is to delete any existing configuration for this childlist and lost its default settings instead.

CloseWindow()

This method is called when the window is closed and is used to properly dispose the component.

Updated on December 28, 2022

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment