Click or drag to resize

PageConfigurationUIDataGridConfiguration_LayoutUpdated Method

Event layout updated: triggers of event DataGridLayoutUpdated or override this.

Namespace:  SOWIWin.Helper
Assembly:  SOWIWin.Helper (in SOWIWin.Helper.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax
protected virtual void DataGridConfiguration_LayoutUpdated(
	Object sender,
	EventArgs e
)

Parameters

sender
Type: SystemObject
This object to pass on event DataGridLayoutUpdated
e
Type: SystemEventArgs
This object to pass on event DataGridLayoutUpdated
Examples
This example override this and puts data grid columns visibility
/// <summary>
/// Event layout updated: data grid sets columns (visibility)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected override void DataGridConfiguration_LayoutUpdated(object sender, EventArgs e)
{
    if (this.DataGridConfiguration.Columns.Count != 0)
    {
        foreach (var item in this.DataGridConfiguration.Columns)
        {
            switch (item.Header.ToString())
            {
                case "Email":                        // is an object
                case "SMTP":                         // is an object
                case "Filename":                     // is a get property
                case "Path":                         // is a get property
                    item.Visibility = System.Windows.Visibility.Hidden;
                    break;

                default:
                    break;
            }
        }
    }
}
See Also