Live Grid Supported Column Types

The Live Grid currently supports five column types that can help you to visualize your data appropriately. These columns are described below.

Each column binds to data by setting the propertyPath property to the name of the corresponding property on the items of your underlying dataSource bound to the grid.


Text Column

The IgrTextColumn is used for displaying formatted text in its associated cells. This is the default column type used to display data of the string data type.

Numeric Column

The IgrNumericColumn is used for displaying a formatted numeric value in its associated cells and enables control of decimal place placement within cells and displaying fractional digits.

DateTime Column

The IgrDateTimeColumn is used for displaying Date objects in its associated cells and enables control to format the Date objects how you see fit.

Image Column

The IgrImageColumn is used for displaying an image within a cell and exposes options for image stretch customization for cells by using its imageStretchOption option.

You can also choose what type of resource your image is by setting the imageResourceType option.

Template Column

The IgrTemplateColumn is used in conjunction with a cell template. It enables you to apply a custom template to the column's cell. This is done by handling the cellUpdating event of the template column.

The cellUpdating event's arguments expose the IgrTemplateColumn that fires the event as well as a TemplateCellUpdatingEventArgs parameter. This event arguments parameter exposes a content property that returns the HTMLDivElement that will be placed within the associated cells of the column. You can then append new elements to this div.

The TemplateCellupdatingEventArgs also exposes a cellInfo property that you can use to get a TemplateCellInfo object. This object exposes information about the cell and the row, such as the index, underlying data item, and appearance of the cell.

Code Snippet

The following demonstrates the implementation of each of the columns described in this topic:

    <IgrTextColumn propertyPath="FirstName" headerText="First Name" />
    <IgrTextColumn propertyPath="LastName" headerText="Last Name" />
    <IgrTemplateColumn propertyPath="Address" headerText="Address"
                       cellUpdating={this.onAddressCellUpdating} />
    <IgrImageColumn propertyPath="Photo" headerText="Photo"        
                    imageResourceType="LocalAsset" /> 
    <IgrNumericColumn propertyPath="Age" headerText="Age"  />
    <IgrDateTimeColumn propertyPath="Birthday" headerText="Date of Birth"  />
public onAddressCellUpdating(s: IgrTemplateColumn, e: TemplateCellUpdatingEventArgs) {

    const content = e.content as HTMLDivElement;

    if (content.childElementCount === 0) {

        const templ = e.cellInfo as TemplateCellInfo;
        const item = templ.rowItem;

        const span1 = document.createElement("span");

        const span2 = document.createElement("span");
        span2.append(item.City); = "normal"; = "grid";


The following is a sample data source to use with the above columns.

const maleNames: string[] = ["Kyle", "Oscar", "Ralph", "Torrey", "Bill", "Frank", "Howard", "Jack", "Larry", "Pete", "Steve", "Vince", "Mark", "Alex", "Max", "Brian", "Chris", "Andrew", "Martin", "Mike", "Steve", "Glenn", "Bruce"];
const femaleNames: string[] = ["Gina", "Irene", "Katie", "Brenda", "Casey", "Fiona", "Holly", "Kate", "Liz", "Pamela", "Nelly", "Marisa", "Monica", "Anna", "Jessica", "Sofia", "Isabella", "Margo", "Jane", "Audrey", "Sally", "Melanie", "Greta", "Aurora", "Sally"];
const lastNames: string[] = ["Adams", "Crowley", "Ellis", "Martinez", "Irvine", "Maxwell", "Clark", "Owens", "Rooney", "Lincoln", "Thomas", "Spacey", "Betts", "King", "Newton", "Fitzgerald", "Holmes", "Jefferson", "Landry", "Newberry", "Perez", "Spencer", "Starr", "Carter", "Edwards", "Stark", "Johnson", "Fitz", "Chief", "Blanc", "Perry", "Stone", "Williams", "Lane", "Jobs", "Adama", "Power", "Tesla"];
const genders: string[] = ["male", "female"];
const cities: string[] = ["New York, New York", "Columbus, Ohio", "Los Angeles, California", "Orlando, Florida", "New Orleans, Louisiana", "Las Vegas, Nevada", "Atlanta, Georgia"];
const roadSuffixes: string[] = ["Road", "Street", "Court", "Way"];
const roadNames: string[] = ["Alpha", "Beta", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel", "India", "Juliett", "Kilo", "Lima", "Mike", "November"];

const people: any[] = [];

let maleCount: number = 0;
let femaleCount: number = 0;
for (let i = 0; i < 250; i++) {

    const age: number = Math.round(this.getRandomNumber(20, 40));
    const today: Date = new Date();
    const gender: string = this.getRandomItem(genders);

    let firstName: string;
    const lastName: string = this.getRandomItem(lastNames);

    const propertyNum: string = Math.round(this.getRandomNumber(1, 300)).toString();
    const cityState: string = this.getRandomItem(cities);
    const road: string = this.getRandomItem(roadNames) + " " + this.getRandomItem(roadSuffixes);

    let photoPath: string;

    if (gender === "male") {
        firstName = this.getRandomItem(maleNames);

        if(maleCount > 26){
             maleCount = 0;

        if (maleCount < 10) {
            photoPath = '/assets/GUY0' + maleCount.toString() + '.png';
        else {
            photoPath = '/assets/GUY' + maleCount.toString() + '.png';
    else {
        firstName = this.getRandomItem(femaleNames);

        if(femaleCount > 24){
            femaleCount = 0;

        if (femaleCount < 10) {
            photoPath = '/assets/GIRL0' + femaleCount.toString() + '.png';
        else {
            photoPath = '/assets/GIRL' + femaleCount.toString() + '.png';

    const path: string = './assets/GIRL01.png';

    const birthday: Date = new Date(today.getFullYear() - age, Math.round(this.getRandomNumber(1, 12)), Math.round(this.getRandomNumber(1, 28)));

        Address: propertyNum + " " + road + ", " + cityState,
        Age: age,
        Birthday: birthday,
        City: cityState,
        FirstName: firstName,
        LastName: lastName,
        Photo: path,
        Street: propertyNum + " " + road + ","
} = people;

public getRandomNumber(min: number, max: number): number {
    return min + Math.random() * (max - min);

public getRandomItem(array: any[]): any {
    const index = Math.round(this.getRandomNumber(0, array.length - 1));
    return array[index];