This question is locked. New answers and comments are not allowed.
Hello!
I'm starting to use telerik extensions for mvc and I'm having problem to add a select control in a Grid.
I have that:
I tried to insert a select of 3 different ways but anyone of them are not working.
1st - The component is shown but is not possible to select a value
2nd - The component is shown but I don't know how I can add the values do select, 'cause I need to add values from database.
3rd - The component isn't shown.
I need to bind the select component and to select a value if the field IdGrupo is different of 0.
P.S.: I attached a image of my grid.
Someone here have any idea?
Thanks and Best Regard!
I'm starting to use telerik extensions for mvc and I'm having problem to add a select control in a Grid.
I have that:
Html.Telerik().Grid(((BRIC.Web.ViewModel.ProcessoImportacaoViewModel)Model).gridProcessos).Name("GridProcessos").DataKeys(dkeys => dkeys.Add(a => a.Processo)) .DataBinding(binding => binding.Ajax().Select("GridProcessos", "ProcessoImportacao")) .Columns(columns => { columns.Bound(b => b.Processo).Title("Processo"); columns.Bound(b => b.grupo).ClientTemplate( Html .Telerik() .DropDownList() .Name("ddlGrupo") .BindTo(new SelectList((System.Collections.IEnumerable)ViewData["Grupo"], "Id", "descricao")) .Enable(true) .ToHtmlString() ).Title("Grupo").HtmlAttributes(new { disabled = "false" }); columns.Bound(b => b.IdGrupo).ClientTemplate( "<select id='Select_<#= Processo #>_<#= IdGrupo #>' style='width:200px;'> options='<#= grupo #>'" + "</select>" ).Title("Grupos"); columns.ForeignKey(fkey => fkey.IdGrupo,(System.Collections.IEnumerable)ViewData["Grupo"], "Id", "descricao");}).ClientEvents(clientEvents => clientEvents.OnDataBinding("OnDataBindingProcessos")).Sortable(sorting => sorting.SortMode(GridSortMode.SingleColumn)).Pageable(paging => paging.Style(GridPagerStyles.NextPreviousAndNumeric).Position(GridPagerPosition.Bottom).PageSize(10)).Filterable().Selectable(x=> x.Enabled(true)).Scrollable()1st - The component is shown but is not possible to select a value
2nd - The component is shown but I don't know how I can add the values do select, 'cause I need to add values from database.
3rd - The component isn't shown.
I need to bind the select component and to select a value if the field IdGrupo is different of 0.
P.S.: I attached a image of my grid.
Someone here have any idea?
Thanks and Best Regard!