Preview binary data
Download binary data
Razor
DbNetGridCore employeesGrid = new DbNetGridCore("northwind", "employees", "imageGrid")
{
Columns = new List() { "EmployeeId", "FirstName", "LastName", "Title", "Photo", "PhotoPath" },
PageSize = 5
};
employeesGrid.View = true;
employeesGrid.PageSize = 5;
employeesGrid.MaxImageHeight = 40;
employeesGrid.Bind(EventType.OnConfigureBinaryData, "configureImageFileName");
employeesGrid.Column("Photo").Image( new ImageConfiguration("jpg"));
@employeesGrid.Render()
DbNetGridCore downloadGrid = new DbNetGridCore("northwind", "employees", "downloadGrid")
{
Columns = new List() { "EmployeeId", "FirstName", "LastName", "Title", "Photo", "PhotoPath" },
PageSize = 5
};
downloadGrid.Column("EmployeeId").Hidden();
downloadGrid.Bind(EventType.OnConfigureBinaryData, "configureImageFileName");
downloadGrid.Column("Photo").File(new FileConfiguration("jpg"));
@downloadGrid.Render()