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

Custom header title in MVC Grid

0 Answers 159 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Manos
Top achievements
Rank 1
Manos asked on 10 Nov 2012, 10:07 AM
Hi, I am trying to set the Header title for a field a parameter value.

eg. something like the below (I would like the value in bold FIRST_HEADER to be for example x.FIRST_HEADER derived from the model and not a static string.

Thanks in advance
Manos


@(Html.Telerik().Grid<CheckoutConfirmDeliveryModel>()
                            .Name("gvDelivery")
                            .ClientEvents(events => events                        
                            .OnDataBinding("onDataBinding"))
                            //.OnDataBound("onDataBound"))
                            //.OnComplete("onComplete"))
                        .Columns(columns =>
                        {                           
                            columns.Bound(x => x.FIRST_ID).Hidden(false);
                                                   
                            columns.Template(x => Html.ActionLink(x.FIRST, "FIRSTACTION", "CheckoutController", new { x.TIME_ID })).Title(FIRST_HEADER).ClientTemplate("<a href=\"" + Url.Action("SelectDeliveryDateTime", "CheckoutController") + "/<#= FIRST#>\">" + "<#= FIRST #>" + "</a>");                          
                        })
                                .DataBinding(dataBinding => dataBinding.Ajax().Select("DeliveryList", "Checkout", Model))
                                .EnableCustomBinding(true))

No answers yet. Maybe you can help?

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