Search Results for

    Show / Hide Table of Contents

    Class GridWriter

    A class responsible for writing the c# code to create a grid using the LemonEdge UI API from a ICustomGrid definition.

    See https://web.lemonedge.com/help/custom-grids/ for more information on custom grid definitions

    Inheritance
    System.Object
    GridWriter
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: LemonEdge.Client.Core.Views.Core.Writers
    Assembly: ClientCore.dll
    Syntax
    public class GridWriter

    Constructors

    GridWriter(ICustomGrid, IEnumerable<ICustomGridColumn>, String)

    Creates a new grid writer for the specified ICustomGrid and its associated settings

    Declaration
    public GridWriter(ICustomGrid grd, IEnumerable<ICustomGridColumn> cols, string customUsing = null)
    Parameters
    Type Name Description
    ICustomGrid grd

    The custom grid definition to generate the equivelant c# code for

    System.Collections.Generic.IEnumerable<ICustomGridColumn> cols

    The definition of every column in the grid

    System.String customUsing

    An optional custom namespace to be included in the usings header section of the generated file

    Methods

    AddFileFooterAndCloseNamespaces(ClassFileWriter)

    Ends the namespace created by this grid writer (through AddFileHeadersAndNamespace(ClassFileWriter)) for creating custom grids in

    Declaration
    public void AddFileFooterAndCloseNamespaces(ClassFileWriter writer)
    Parameters
    Type Name Description
    ClassFileWriter writer

    The writer to finish the grid view namespace for

    AddFileHeadersAndNamespace(ClassFileWriter)

    Adds the using statement and namespace required for generating a grid view class.

    Declaration
    public void AddFileHeadersAndNamespace(ClassFileWriter writer)
    Parameters
    Type Name Description
    ClassFileWriter writer

    The writer to add the header code to.

    UpdateGrid(ICustomGrid, IEnumerable<ICustomGridColumn>)

    Updates the grid definition to use when generating the equivelant code

    Declaration
    public void UpdateGrid(ICustomGrid grd, IEnumerable<ICustomGridColumn> cols)
    Parameters
    Type Name Description
    ICustomGrid grd

    The custom grid definition to generate the equivelant c# code for

    System.Collections.Generic.IEnumerable<ICustomGridColumn> cols

    The definition of every column in the grid

    WriteFile()

    Creates and returns an entire c# file containing all the code to create the equivelant ICustomGrid in code referencing the LemonEdge UI API

    Declaration
    public string WriteFile()
    Returns
    Type Description
    System.String

    An entire c# file containing all the code to create the equivelant ICustomGrid in code referencing the LemonEdge UI API

    WriteToFile(ClassFileWriter)

    Writes a class definition of the current grid, and its settings (columns), to the specified ClassFileWriter

    Declaration
    public void WriteToFile(ClassFileWriter writer)
    Parameters
    Type Name Description
    ClassFileWriter writer

    The writer to add a class for this grid to

    Extension Methods

    MiscExtensions.SetIfNotEqual<T, P>(T, Expression<Func<T, P>>, P)
    ReflectionExtensions.ClearEventInvocations(Object, String)
    StringExtensions.ToCSVFormatString(Object, Type)
    SQLExtensions.ToSQLValue(Object, Boolean)
    In This Article
    Back to top © LemonTree Software Ltd. All rights reserved.