Add Column


Node Information
Adds Column to specified DataGridView.
General Information
• This node doesn't have other available options.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
Add IN RUN MULTIPLE FALSE FALSE
DataGridView IN Object ONE FALSE FALSE
Column IN Object ONE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.UI.DataGridView
{
    [IsNode("Add Column")]
    public class DataGridViewAddColumn : Node
    {
        Port run = new Port(PortType.IN, typeof(RUN), AcceptsLinks.MULTIPLE, "Add");
        Port control = new Port(PortType.IN, typeof(object), AcceptsLinks.ONE, "DataGridView");
        Port col = new Port(PortType.IN, typeof(object), AcceptsLinks.ONE, "Column");
        public DataGridViewAddColumn()
        {
            NodeType = KGraph.NodeType.Method;
            Name = "Add Column";
            AddPort(run);
            AddPort(control);
            AddPort(col);
            ReferenceType = typeof(System.Windows.Forms.DataGridViewColumn);
            Information = "Adds Column to specified DataGridView.";
        }
        public override string Code()
        {
            return GetValue(control) + ".Columns.Add(" + GetValue(col) + ");";
        }
    }
}