protected override string?GetSortExpression() { if (string.IsNullOrEmpty(SortExpression)) { return(ValueBinding?.GetProperty <OriginalStringBindingProperty>()?.Code ?? throw new DotvvmControlException(this, $"The 'ValueBinding' property must be set on the '{GetType()}' control!")); } else { return(SortExpression); } }