Hi,
I have this code in my page
@(Html.Kendo().Grid<LibroDinamico.Models.LibroViewModel>()
.Name("gridLibros")
.Columns(columns =>
{
columns.Bound(c => c.Titulo);
columns.Command(command => { command.Edit(); command.Destroy(); });
})
.Scrollable()
.ToolBar(toolbar => toolbar.Create())
.Editable(editable =>
{
editable.Mode(GridEditMode.PopUp);
})
.ColumnMenu(p => p.Columns(false))
.Filterable().Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
.Sortable(sortable => sortable.AllowUnsort(false))
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(true)
.PageSizes(new[] { 5, 10, 25, 50 }))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.Model(model =>
{
model.Id(p => p.Id);
model.Field(p => p.Id).Editable(false);
})
.Create(create => create.Action(MVC.Libro.ActionNames.Create, MVC.Libro.Name))
.Read(read => read.Action(MVC.Libro.ActionNames.GetLibros, MVC.Libro.Name))
.Update(update => update.Action(MVC.Libro.ActionNames.Edit, MVC.Libro.Name))
.Destroy(destroy => destroy.Action(MVC.Libro.ActionNames.Delete, MVC.Libro.Name))
)
)
With this ViewModel
public class LibroViewModelwith
{
public int Id { get; set; }
public string Titulo { get; set; }
public DateTime Creado { get; set; }
public DateTime Modificado { get; set; }
}
When I click in Add a new row the popup appears with all the properties of the view model, but I dont want to show all this properties, I want only to present the Titulo. How I can do this.
Thanks
I have this code in my page
@(Html.Kendo().Grid<LibroDinamico.Models.LibroViewModel>()
.Name("gridLibros")
.Columns(columns =>
{
columns.Bound(c => c.Titulo);
columns.Command(command => { command.Edit(); command.Destroy(); });
})
.Scrollable()
.ToolBar(toolbar => toolbar.Create())
.Editable(editable =>
{
editable.Mode(GridEditMode.PopUp);
})
.ColumnMenu(p => p.Columns(false))
.Filterable().Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
.Sortable(sortable => sortable.AllowUnsort(false))
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(true)
.PageSizes(new[] { 5, 10, 25, 50 }))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.Model(model =>
{
model.Id(p => p.Id);
model.Field(p => p.Id).Editable(false);
})
.Create(create => create.Action(MVC.Libro.ActionNames.Create, MVC.Libro.Name))
.Read(read => read.Action(MVC.Libro.ActionNames.GetLibros, MVC.Libro.Name))
.Update(update => update.Action(MVC.Libro.ActionNames.Edit, MVC.Libro.Name))
.Destroy(destroy => destroy.Action(MVC.Libro.ActionNames.Delete, MVC.Libro.Name))
)
)
With this ViewModel
public class LibroViewModelwith
{
public int Id { get; set; }
public string Titulo { get; set; }
public DateTime Creado { get; set; }
public DateTime Modificado { get; set; }
}
When I click in Add a new row the popup appears with all the properties of the view model, but I dont want to show all this properties, I want only to present the Titulo. How I can do this.
Thanks