Click or drag to resize

DataMappingTable<EXTENSION, ROWCONTROLTYPE, SETTINGS> Methods

The DataMappingTable<EXTENSION, ROWCONTROLTYPE, SETTINGS> type exposes the following members.

Methods
 NameDescription
Protected methodAllMappingsValid Used to determine if all visible rows are fully defined (IsMappingValid()), so a new empty row could be added.
(Overrides DataMappingTable.AllMappingsValid())
Public methodButtonClicked Invoked when button is clicked. This implementation handles the TAG_ACTION button press and calls the approriate handler set at UpdateActionButton().
(Overrides DataMappingTable.ButtonClicked(DataMappingRowControl, String))
Protected methodCanAddNewBinding Return true if new additional binding can be added.
Public methodClearCaches Clear cached selectables
Protected methodCreateNewBindingRow Creates new Additional Binding control to the table. InitNewBinding(ROWCONTROLTYPE) is NOT called after this, so you must populate the values yourself like so:
C#
var row = CreateNewBindingRow();
row.InitProperties(() => 
  {
    row.MyProperty = .... 
  });
Protected methodDeleteSettings Handle deletion of owned Core object if any.
Public methodInit MUST BE CALLED immediately after object creation. Calls Init(Boolean).
Protected methodInitNewBinding Set initial values (e.g. nulls) to all properties of the row. Settings properties to binding within this function will not cause PropertyChanged(DataMappingRowControl, String) event.
Protected methodIsValidForSaving Object is valid for saving if MainBindings is valid.

Note that bindings in AdditionalBindings do NOT have to be valid.
(Overrides DataMappingTable.IsValidForSaving())
Protected methodLoadCombos<T> This function can be used to load the same content to all currently visible controls (except exept if non-null).

This function can be usefull, if you have already set the values to your combos before loading the actual available values. Calling this function will then set non-available values as error selection.
Public methodLoadSettings Load settings for this table. If the settings is not SettingsIsNew(SETTINGS) but existing and loaded, then the table is Locked after loading, and it can be unlocked using TAG_ACTION button.
Protected methodLoadSettingsToTable Load the provided settings to the table. Populate MainBindings and add new AdditionalBindings to populate using CreateNewBindingRow(ROWCONTROLTYPE).

When populating values to your objects, use InitProperties(Action) to avoid PropertyChanged(DataMappingRowControl, String) event during loading.
C#
MainBindings.InitProperties(() =>
{
  MainBindings.Name = settings.CTObject.Name;
  MainBindings.DataSource = settings.Source;
});
Public methodPropertyChanged Invoked when any property is changed. If the changed property is not TAG_STATUS, sets the status to Modified. Then checkes if all mappings are now valid (AllMappingsValid()) and if new binding can be added CanAddNewBinding(). Adds new empty binding to the end of the table if previous two are true.
If new binding is added InitNewBinding(ROWCONTROLTYPE) is called for it.
(Overrides DataMappingTable.PropertyChanged(DataMappingRowControl, String))
Protected methodRemoveBinding Remove given binding for the table. Completely disposes it and its controls, and moves all bindings below it up.
Public methodReset Removes everything and resets this table.
Public methodSave Save this object if it's valid for
Protected methodSaveSettings Save everything from UI to settings. Create new objects if needed etc.
Protected methodSettingsIsNew Return true if the given settings is new, or false if it's loaded.
Protected methodUpdateActionButton Updated the action button and its action based on Status.
Top
See Also