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

grid: Client Template problem

4 Answers 288 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jelena
Top achievements
Rank 1
Jelena asked on 24 Jul 2012, 06:01 PM
  I appreciate any help.. I am trying to use ClientTemplate.

   @Html.Raw(Html.ActionLink("Select", "SelectIt", new { SelectedQueueLevel = "#= QueueLevel #" }, new { @class = "btn" }).ToHtmlString()).ToHtmlString();

as a result I have:
<a class="btn" href="/Core/CollectorQueue/SelectIt?SelectedQueueLevel=%23%3D%20QueueLevel%20%23">Select</a>;

  What I am doing wrong? 
     
Here is the whole thing for grid below:    
 
            @(Html.Kendo().Grid(Model.CollectorQueueGrid)
           .Name("CollectorQueueGrid")
           .Columns(columns =>
                        {
                            columns.Template(item => Html.ActionLink("Select", "SelectIt", new { SelectedQueueLevel = item.QueueLevel }, new { @class = "btn" }))
                                .ClientTemplate(Html.ActionLink("Select", "SelectIt", new { SelectedQueueLevel = "#=QueueLevel#" }, new { @class = "btn" }).ToHtmlString());
                            columns.Bound(item => item.QueueDate).Width(30).Format("{0:MM/dd/yyyy}");
                            columns.Bound(item => item.QueueLevel).Width(150);
                            columns.Bound(item => item.ScheduledTime).Width(20);
                        })
           .DataSource(dataSource => dataSource.Ajax().ServerOperation(false))
            .Sortable()
            .Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
           .Groupable()
                  )

Thank you.

4 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 25 Jul 2012, 06:41 AM
Hello Jelena,

 This issue is addressed in our latest internal build. Please download it and give it a go.

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jelena
Top achievements
Rank 1
answered on 25 Jul 2012, 11:00 AM
Atanas,

Thank you for very quick response. But it still doesn't completely.
It works in case:
       .ClientTemplate(@"<a href=""/Core/CollectorQueue/SelectIt?SelectedQueueLevel=#=QueueLevel#"" class=""btn"">#=QueueLevel#</a>")
I am looking forward to use:
 .ClientTemplate((@Html.ActionLink("Select", "SelectIt", new {SelectedQueueLevel = "#=QueueLevel"}, new {@class = "btn"}).ToHtmlString()));
Would you attach a project sample with your latest build?
Thank you,
Jelena
0
Accepted
Atanas Korchev
Telerik team
answered on 25 Jul 2012, 01:42 PM
Hello Jelena,

 Could you confirm that the upgrade has been correctly performed? Check the assembly version of the reference Kendo.Mvc.dll. It should be the one from the internal build.

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jelena
Top achievements
Rank 1
answered on 26 Jul 2012, 01:42 PM
Thank you for help. Everything works.
Tags
Grid
Asked by
Jelena
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Jelena
Top achievements
Rank 1
Share this question
or