This question is locked. New answers and comments are not allowed.
I'm not finding many examples to help me convert my grid control from server bound to ajax bound. Particulary, I need help with HTML helpers in client templates. Here's my server bound grid control:
I've been able to convert the progress bar, only because it doesn't call any helper extensions:
I haven't been able to figure out the magic recipe of escape characters for the edit and subject columns, nor the detail view. I've seen examples calling javascript functions in the view. Since I'm changing the grid to client templates, do I need to convert my html helpers into javascript functions?
<% Html.Telerik().Grid(Model) .Name("grdIssues") .Columns(columns => { columns.Bound(o => o.id) .Title("Issue Id") .Width(100); columns.Template(o => {%> <%: Html.Truncate(o.subject, 40) %> <%}) .Title("Subject") .Width(300); columns.Template(o => {%> <div id="progressbar"> <div class="progress-indicator" id="indicator" style="width: <%= o.progress_ratio %>%"></div> <span class="progress-indicator" id="progress-number"><%= o.progress_ratio %>%</span> </div> <%}) .Title("Progress"); columns.Template(o => {%> <input type="button" class="t-button t-state-default" onclick="document.location.href = '<%: Url.Action("EditIssue", "Home", new {id = o.id}) %>'" value="Edit" style="margin: 0px; width: 50px" /> <%}) .Width(65); }) .DetailView(detailView => detailView.Template(e => {%> <div class="issue-details"> <div class="issue-details-col1"><label>Description:</label></div> <div class="issue-details-col2"><%= e.description %></div> <div class="issue-details-col1"><label>Frequency:</label></div> <div class="issue-details-col2"><%= e.frequency %></div> <div class="issue-details-col1"><label>Submitted by:</label></div> <div class="issue-details-col2"><%= e.creator %> <strong> on </strong> <%: Html.ConvertToServerTime(e.created_on) %> </div> </div> <%})) .Scrollable(scrolling => scrolling .Enabled(true) .Height("auto")) .Sortable(sorting => sorting.Enabled(true)) .Filterable(filtering => filtering.Enabled(true)) .Footer(true) .RowAction(row => row.Selected = row.DataItem.id.Equals(ViewData["id"])) .Render(); %>I've been able to convert the progress bar, only because it doesn't call any helper extensions:
columns.Bound(o => o.progress_ratio) .ClientTemplate("<div id='progressbar'>" + " <div class='progress-indicator' id='indicator' style='width: <#= progress_ratio #>%'></div>" + " <span class='progress-indicator' id='progress-number'><#= progress_ratio #>%</span>" + "</div>") .Title("Progress");I haven't been able to figure out the magic recipe of escape characters for the edit and subject columns, nor the detail view. I've seen examples calling javascript functions in the view. Since I'm changing the grid to client templates, do I need to convert my html helpers into javascript functions?