protected void OnSortClicked(Base.BaseDataGridColumn <TItem> column)
        {
            if (AllowSort && column.AllowSort)
            {
                column.Direction = column.Direction == SortDirection.Descending ? SortDirection.Ascending : SortDirection.Descending;
                sortByColumn     = column;

                // just one column can be sorted for now!
                foreach (var col in Columns)
                {
                    if (col.ElementId == column.ElementId)
                    {
                        continue;
                    }

                    // reset all others
                    col.Direction = SortDirection.Ascending;
                }

                dirtyFilter = dirtyView = true;
            }
        }
 /// <summary>
 /// Links the column with this datagrid.
 /// </summary>
 /// <param name="column">Column to link with this datagrid.</param>
 internal void Hook(BaseDataGridColumn <TItem> column)
 {
     Columns.Add(column);
 }
 protected void OnFilterChanged(BaseDataGridColumn <TItem> column, string value)
 {
     column.Filter.SearchValue = value;
     dirtyFilter = dirtyView = true;
 }