MtxGridView Class

Source: Controls/MtxGridView.cs · Assembly: Dew.Math.Controls
DataGridViewMtxGridView

public class MtxGridView : DataGridView

Visual control for simple viewing/editing of vector or matrix values.

Use this control to view and edit matrix or vector values. Simply drop control on the form and connect it to vector or matrix object by setting it's DataObject property.

Examples

csharp
using Dew.Math;
using Dew.Math.Controls;

namespace Dew.Examples
{
    private void Example(MtxGridView mgv)
    {
        Matrix m = new Matrix(10,3);
        m.RandGauss();
        mgv.ReadOnly = true;
        mgv.ShowObjectInfo = true;
        mgv.DataObject = m;
    }
}

Properties

NameTypeDescription
AutoSizeColsBooleanSets the custom column width
CustomColWidthInt32Sets the custom column width
DataObjectTMtxVecBaseMtxGridView Datasource Object.
IsIntegerBooleanReturns True, if DataObject is TMtxInt or TVecInt type.
IsMatrixBooleanReturns True, if DataObject is TMtx or TMtxInt type.
IsVectorBooleanReturns True, if DataObject is TVec or TVecInt type.
numberFormatStringDefines number formatting. For examaple "0.####"
ObjectInfoTextStringObject info text, displayed in top-left cell.
ShowObjectInfoBooleanShow object info in top-left cell.
ShowRowColIndexesBooleanShow/hide row and column indexes at the same time.
SplitCplxBooleanSplit complex number into real and imaginary part.

Methods

NameDescription
ctorMtxGridView constructor.
DataObjectChangedCheck if Dew.Math.Controls.MtxGridView.DataObject has changed.
UpdateGridPopulates MtxGridView with new values.