Initialize Grid

In this section, you can learn about Grid’s mandatory property to render a simple Grid. To initialize Grid, it needs two important properties. They are columns and its inner property field. Columns are used to define schema of Grid and field is mapping a name to the data source.

  • html
  • <ej:Grid ID="FlatGrid" runat="server">
    
                <Columns>
    
                    <ej:Column Field="OrderID" />
    
                    <ej:Column Field="CustomerID" />
    
                    <ej:Column Field="EmployeeID" />
    
                </Columns>
    
            </ej:Grid>

    The following output is displayed as a result of the above code example.