/winforms-grid-with-minimum-row-height

Create a custom Grid Control with the lowest row height possible.

Primary LanguageVisual Basic .NETOtherNOASSERTION

WinForms Data Grid - Create a custom View with the lowest row height

The example creates a custom grid control (MinRowHeightGridControl) with the lowest row height possible. The custom grid is read-only and we assume that only text columns can be used.

WinForms Data Grid - Create a custom View with the minimum row height

public class MinRowHeightGridViewInfo : GridViewInfo {
    public MinRowHeightGridViewInfo(MinRowHeightGridView view) : base(view) { }
    protected override int CalcMinRowHeight() {
        return Convert.ToInt32(PaintAppearance.Row.CalcTextSize(GInfo.Cache, "Gq", int.MaxValue).Height) + 1;
    }
}

Files to Review

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)