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

[Solved] Losing conditional link with binding.Ajax().OperationMode(GridOperationMode.Client)

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.
Craig
Top achievements
Rank 1
Craig asked on 30 Jul 2012, 03:17 PM
In my grid I have a column which conditionally shows a link based on a value in the viewmodel. This works fine when the view is first built but when I move from one page to another on the grid the links disappear.

How can I get them to hang around? I really don't want to have to go back to server-side binding!

@(Html.Telerik().Grid(Model.Submissions)
      .Name("Submissions")
      .Columns(columns =>
      {
          columns.Bound(o => o.SubmissionId).Title("Submission ID").Width(100);
          columns.Bound(o => o.DateSubmittedText).Title("Date Submitted").Width(100);
          columns.Bound(o => o.StatusText).Title("Status").Width(100);
          columns.Template(@<text>
            <ul class="sh_links">
                @{
                    if (!string.IsNullOrWhiteSpace(item.Results))
                    {
                      @Html.ActionLink("Download", "GetResults", "Dashboard", new { results = item.Results }, null)
                    }
                }
            </ul>
          </text>).Title("Results").Width(100);
      })
      .DataBinding(binding => binding.Ajax().OperationMode(GridOperationMode.Client))
      .Pageable(paging => paging.PageSize(10))
)
Tags
Grid
Asked by
Craig
Top achievements
Rank 1
Share this question
or