This is a migrated thread and some comments may be shown as answers.

[Solved] Template not work

0 Answers 11 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rodrigo
Top achievements
Rank 1
Rodrigo asked on 31 May 2012, 11:16 AM
I'm trying to use a template in my grid and is not working. nothing appears. 
Look my code:

    @(Html.Telerik().Grid<WebClinic.Areas.Seguranca.Models.Modulo>()
        .Name("Grid")
        .DataKeys(keys =>
        {
            keys.Add(model => model.ModuloId);
        })
        .Columns(columns =>
        {
            columns.Bound(model => model.Nome).Width(100);
            columns.Bound(model => model.NomeExibicao).Width(200);
            columns.Bound(model => model.DataAtualizacao).Format("{0:dd/MM/yyyy}").Width(120);
            columns.Template(
                @<text>
                    <img 
                        alt="@item.ModuloId " 
                        src="@Url.Content("~/Content/Images/Icons/add.png") " 
                      />
                </text>
            ).Width(16).Title("");
            columns.Command(commands =>
            {
                commands.Delete().ButtonType(GridButtonType.BareImage);
            }).Width(16).Title("");


        })
            .DataBinding(dataBinding => dataBinding.Ajax()
                .Select("Index", "Modulo")
                .Update("Edit", "Modulo")
                .Delete("DeleteAjax", "Modulo"))
            .Pageable()
            .Sortable()
            .Scrollable()
            //.Groupable()
            //.Filterable()
                )
Tags
Grid
Asked by
Rodrigo
Top achievements
Rank 1
Share this question
or