Hi!
I'm sorry for my bad english.
I have a problem with grid's components, when the grid is in edit mode don't show kendo's components but a asp.Net MVC components.
ViewModel:
public class ProjetoViewModel
{
public int IdProjeto { get; set; }
[DisplayName("CodigoProjeto")]
public string CodigoProjeto { get; set; }
[DisplayName("Nome")]
[DataType(DataType.Text)]
public string Nome { get; set; }
[DisplayName("AnoInicial")]
[DataType("Integer")]
[Range(0, int.MaxValue)]
public int AnoInicial { get; set; }
}
Grid:
@(Html.Kendo().Grid<DemurrageWeb_ViewModel.Sistema.ProjetoViewModel>()
.Name("GridProjeto")
.Columns(columns =>
{
columns.Command(command =>
{
command.Destroy().HtmlAttributes(new { @title = @DemurrageWeb_Resource.Util.Button.Excluir });
command.Edit().HtmlAttributes(new { @title = @DemurrageWeb_Resource.Util.Button.Alterar });
}).Width(111).HtmlAttributes(new { @class = "Icon" });
columns.Bound(p => p.IdProjeto).Hidden(true);
columns.Bound(p => p.Nome).Width("50%");
columns.Bound(p => p.CodigoProjeto).Width("30%");
columns.Bound(p => p.AnoInicial).Width("20%");
})
.ToolBar(toolbar =>
{
toolbar.Create().Text("").HtmlAttributes(new { @class = "Icon icAdd", @title = @DemurrageWeb_Resource.Util.Button.Inserir });
})
.Editable(editable => editable.Mode(GridEditMode.PopUp))
.Pageable(pg =>
{
pg.Refresh(true);
pg.PageSizes(new[] { 10, 20, 30 });
pg.Input(true); pg.Numeric(false);
})
.Sortable()
.Scrollable(s => s.Enabled(true).Height("100%"))
.DataSource(dataSource => dataSource
.Ajax()
.Events(events => events.Error("error_handler"))
.Model(model => model.Id(p => p.IdProjeto))
.Batch(true)
.Read("Projeto_Read", "SProjeto")
.Create("Projeto_Create", "SProjeto")
.Update("Projeto_Update", "SProjeto")
.Destroy("Projeto_Destroy", "SProjeto")
.ServerOperation(false)
)
)
I'm with 2012 Q3 version of kendo UI.
I'm sorry for my bad english.
I have a problem with grid's components, when the grid is in edit mode don't show kendo's components but a asp.Net MVC components.
ViewModel:
public class ProjetoViewModel
{
public int IdProjeto { get; set; }
[DisplayName("CodigoProjeto")]
public string CodigoProjeto { get; set; }
[DisplayName("Nome")]
[DataType(DataType.Text)]
public string Nome { get; set; }
[DisplayName("AnoInicial")]
[DataType("Integer")]
[Range(0, int.MaxValue)]
public int AnoInicial { get; set; }
}
Grid:
@(Html.Kendo().Grid<DemurrageWeb_ViewModel.Sistema.ProjetoViewModel>()
.Name("GridProjeto")
.Columns(columns =>
{
columns.Command(command =>
{
command.Destroy().HtmlAttributes(new { @title = @DemurrageWeb_Resource.Util.Button.Excluir });
command.Edit().HtmlAttributes(new { @title = @DemurrageWeb_Resource.Util.Button.Alterar });
}).Width(111).HtmlAttributes(new { @class = "Icon" });
columns.Bound(p => p.IdProjeto).Hidden(true);
columns.Bound(p => p.Nome).Width("50%");
columns.Bound(p => p.CodigoProjeto).Width("30%");
columns.Bound(p => p.AnoInicial).Width("20%");
})
.ToolBar(toolbar =>
{
toolbar.Create().Text("").HtmlAttributes(new { @class = "Icon icAdd", @title = @DemurrageWeb_Resource.Util.Button.Inserir });
})
.Editable(editable => editable.Mode(GridEditMode.PopUp))
.Pageable(pg =>
{
pg.Refresh(true);
pg.PageSizes(new[] { 10, 20, 30 });
pg.Input(true); pg.Numeric(false);
})
.Sortable()
.Scrollable(s => s.Enabled(true).Height("100%"))
.DataSource(dataSource => dataSource
.Ajax()
.Events(events => events.Error("error_handler"))
.Model(model => model.Id(p => p.IdProjeto))
.Batch(true)
.Read("Projeto_Read", "SProjeto")
.Create("Projeto_Create", "SProjeto")
.Update("Projeto_Update", "SProjeto")
.Destroy("Projeto_Destroy", "SProjeto")
.ServerOperation(false)
)
)
I'm with 2012 Q3 version of kendo UI.