Comparing cell values

Docs

If you want to inspect the values in the grid after the page loads you can use the OnRowTransform event which will invoke the client-side method columnValue to identify and compare column cell values. In this demo the row is highlighted if the re-order level is above the stock level.

Razor
                                
                                        
DbNetGridCore productsGrid = new DbNetGridCore("northwind", "products");
productsGrid.Column("supplierid").Lookup(new Lookup("suppliers", "supplierid", "companyname")).Label("Supplier");
productsGrid.Column("categoryid").Lookup(new Lookup("categories", "categoryid", "categoryname")).Label("Catgeory");
productsGrid.Column("unitprice").Format("c");
productsGrid.Bind(EventType.OnRowTransform, "highlightOrderLevels");
productsGrid.Bind(EventType.OnViewRecordSelected, "highlightViewOrderLevels");
productsGrid.View = true;
productsGrid.ViewLayoutColumns = 2;
@productsGrid.Render()