Viewing records |
Docs
An expanded view of the currently selected record can be achieved by using the View property to make a view dialog available from the toolbar. The columns that appear in the dialog can be controlled by setting the column View property to true. The example also uses the OnViewRecordSelected event to set the title of the View dialog for the record being displayed and to set the size of the notes element (using the client-side viewElement method). |
Razor
DbNetGridCore employeesGrid = new DbNetGridCore("northwind", "employees")
{
View = true
};
employeesGrid.Column("reportsto").Lookup(new Lookup("Employees", "EmployeeId", "lastname + ',' + firstname"));
employeesGrid.Column("Photo").Image(new ImageConfiguration("jpg"));
employeesGrid.Column(new String[] { "photo", "notes", "photopath" }).DataOnly();
employeesGrid.Column(new String[] { "firstname", "lastname", "photo", "notes", "photopath" }).View();
employeesGrid.Bind(EventType.OnViewRecordSelected, "configureViewDialog");
employeesGrid.Bind(EventType.OnConfigureBinaryData, "configureImageFileName");
@employeesGrid.Render()