3
I have this view Listar.cshtml
@model IEnumerable<ODM>
@{
var idGrid = "grid" + this.ViewBag.IdParameters ?? string.Empty;
var grid = new IBM.Web.Helpers.WebGrid(id: idGrid, rowsPerPage: this.RowsPerPage, ajaxUpdateContainerId: idGrid);
var columns = new WebGridColumn[] {
grid.Column("Codigo", ODMResources.Codigo),
grid.Column("DataEmissao", ODMResources.DataEmissao),
**grid.Column("Iniciativa.Codigo"**,
canSort: false,
header: IniciativaResources.Titulo),
grid.Column("DescricaoChefes", ODMResources.ProjectChief),
grid.Column("Modelo.Codigo",
canSort: false,
header: ModeloResources.ModeloReferencia),
//grid.Column("DescricaoResponsaveis", ODMResources.ProjectResponsible),
grid.Column("Causal", ODMResources.Causal),
grid.Column("Estado", ODMResources.Estado),
}
@grid.GetHtmlExtended(this.Model, this.RowsCount, page: this, columns: columns)
So much Iniciativa.Codigo
how much Modelo.Codigo
do not work. Error appears:
Column "Initiative.Code" does not exist.
How best to call the description of a column of another class in Webgrid?
Note: Initiative and Model has relationship with MDG.