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

Rebind removing template column details

0 Answers 16 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.
neal
Top achievements
Rank 1
neal asked on 10 Apr 2012, 01:16 PM
Hi
I have a problem with a telerik grid where the rebind clears my template field.

This is something to do with the binding being server/client side (or something sorry for the lack of information) and the fact that i am passing the grid a model

here is my grid code, can anyone help please :)

@(Html.Telerik().Grid((IEnumerable<CRM.Lists.lClients>)ViewData["clients"])
.Name("clients")
        .Columns(columns =>
            {
                columns.Bound(c => c.title).Title("Title");
                columns.Bound(c => c.firstname).Title("FirstName");
                columns.Bound(c => c.lastname).Title("LastName");
                columns.Bound(c => c.directphone).Title("Tel");
                columns.Bound(c => c.directmobile).Title("Mob");
                columns.Bound(c => c.directfax).Title("fax");
                
                columns.Template(@<text><a href="mailto:@item.email">@item.email</a></text>).Title("Email");
                columns.Bound(c => c.email).Title("Email").Visible(true);
                columns.Bound(c => c.stexpdate).Title("ST Exp");
            })
                  .Sortable()
                  .Filterable()
                  .Scrollable(c => c.Height("150px"))
                  .Selectable(p => p.Enabled(true))
                    .DataBinding(dataBinding => dataBinding.Ajax().Select("_SelectionClientSide_Clients", "Manage", new { id = 14413 }))
                .Resizable(resizing => resizing.Columns(true))
                .ClientEvents(clientEvents => clientEvents.OnDataBinding("OnDataBind"))

                                )
Tags
Grid
Asked by
neal
Top achievements
Rank 1
Share this question
or