insertRow

insertRow(obj, index) - add item to the specified position in the temporary insert collection of the datasource. If object is not passed a new object with undefined properties is created and inserted. To insert the item into the real datasource the saveChanges() function needs to be called

$("#grid1").shieldGrid({
    dataSource: {
    data: products,
    schema: {
        fields: {
            id: { path: "ProductID", type: Number},
            name: { path: "ProductName", type: String, nullable: false },
            quantity: { path: "SupplierID", type: Number },
            price: { path: "UnitPrice", type: Number },
            units: { path: "UnitsInStock", type: Number },
            discontinued: { path: "Discontinued", type: Boolean },
            myDate: { path: "d", type: Date }
        }
    }
},
rowHover: false,
columns: [
    { field: "id" },
    { field: "name", width: "200px" },
    { field: "quantity" },
    { field: "price" },
    { field: "units" },
    { field: "discontinued" },
        { field: "myDate", format: "{0:MM/dd/yyyy}" }
],
editing: {
    enabled: true,
    event: "doubleclick", 
    type: "cell", 
    confirmation: {
        "delete": {
            enabled: true,
            template: "Delete row {0}?"
        }
    }
}
});
function InsertRow() {
    var row = {
        id: 1000,
        name: "Chai1111",
        quantity: "10 boxes x 20 bags",
        price: 181.0000,
        units: 39,
        ReorderLevel: 10,
        discontinued: true,
        Category: {
            CategoryID: 1,
            CategoryName: "Beverages",
            Description: "Soft drinks, coffees, teas, beers, and ales"
        },
        d: new Date()
    };
    $("#grid1").swidget().insertRow(4, row);
}