I figured how to customize the column header.
GridColumn column = new GridColumn();
if (column.ControlObject is Eto.Wpf.Forms.Cells.CustomCellHandler.Column header)
{
// Add to header whatever control you want
// Wpf - Windows only
AFGridViewHeader _header = new AFGridViewHeader();
header.Header = _header;
}
I am still having problems to get a rowheader.
Currently I am doing the following. When the Eto.Forms.GridView
is constructed I am registering the LoadingRow
event for the ControlObject:
if (this.ControlObject is Eto.Wpf.Forms.Controls.EtoDataGrid dataGrid)
{
dataGrid.RowHeaderWidth = 20;
dataGrid.LoadingRow += new EventHandler<System.Windows.Controls.DataGridRowEventArgs>(this.OnLoadingRow);
}
And handling the event:
private void OnLoadingRow(object sender, System.Windows.Controls.DataGridRowEventArgs e)
{
e.Row.Header = (e.Row.GetIndex() + 1).ToString();
}
Nothing is showing up. Any help would be much appreciated.
Kindest
Christian