This question is locked. New answers and comments are not allowed.
Hello, i want to get the value of a column in a grid inside in a DatailView but dosen´t work.
Here is my code:
The event onRowSelectProduto dosent work, the program doesn't call my function in JS.
Help me please!
Here is my code:
@(Html.Telerik().Grid<PlanoContasProdutoOrcamento>() .Name("GridPlanoContas") .Columns(columns => { columns.Bound(o => o.Id).Hidden(); columns.Bound(o => o.CodigoFormatado).Width(150).Title("Conta"); columns.Bound(c => c.Descricao).Width(150).Title("Descrição"); columns.Bound(c => c.OrcadoAcumulado).Width(75).Title("Orçado").HtmlAttributes(new { style = "text-align:right" }); columns.Bound(c => c.RealizadoAcumulado).Width(75).Title("Realizado").HtmlAttributes(new { style = "text-align:right" }); columns.Bound(c => c.PercentualRealizadoAcumulado).Width(75).Title("% Realizado").HtmlAttributes(new { style = "text-align:right" }); }) /*Details*/ .DetailView(ordersDetailView => ordersDetailView.ClientTemplate( Html.Telerik().Grid<ContaAnaliticaProdutoOrcamento>() .Name("PlanoContasProdutosDetalhe_<#= Id #>") .Columns(columns => { columns.Bound(o => o.Id).Hidden(); columns.Bound(o => o.CodigoFormatado).Width(150).Title("Conta").HtmlAttributes(new { onClick = "onRowSelectProduto" }); columns.Bound(c => c.Descricao).Width(150).Title("Descrição"); columns.Bound(c => c.OrcadoAcumulado).Width(75).Title("Orçado").HtmlAttributes(new {style = "text-align:right"}); columns.Bound(c => c.RealizadoAcumulado).Width(75).Title("Realizado").HtmlAttributes(new {style = "text-align:right"}); columns.Bound(c => c.PercentualRealizadoAcumulado).Width(75).Title("% Realizado").HtmlAttributes(new {style = "text-align:right"}); }) .DataBinding(dataBinding => dataBinding.Ajax() .Select("ProdutosDaContaAjax", "Orcamento", new { IdPlanoContasProduto = "<#= Id #>" })) .ClientEvents(events => { events.OnRowSelect("onRowSelectProduto"); }) .Scrollable(scrolling => scrolling.Height(150)) .Sortable(sorting => sorting.Enabled(true)) .Pageable(paging => paging.Enabled(true)) .Filterable(filtering => filtering.Enabled(true)) .Footer(true) .Selectable() .ToHtmlString() )) .DataBinding(dataBinding => dataBinding.Ajax().Select("PlanoContasProdutoAjax", "Orcamento").Enabled(true)) .Scrollable(scrolling => scrolling.Height(150)) .Sortable(sorting => sorting.Enabled(true)) .Pageable(paging => paging.Enabled(true)) .Filterable(filtering => filtering.Enabled(true)) .Footer(true) .Selectable() .ClientEvents(events => { events.OnRowSelect("onRowSelect"); events.OnLoad("onLoadGrid"); events.OnDetailViewExpand("onDetailViewExpand"); }))The event onRowSelectProduto dosent work, the program doesn't call my function in JS.
Help me please!