This question is locked. New answers and comments are not allowed.
Can anybody tell me what i did wrong in this ClientTemplate workaround recommendation i used for Ajax Binding? It is throwing the
NotSupportedException.
<% Html.Telerik().Grid(Model.URoleViewModel.Group)
.Name("UnAssignedRoleGrid")
.DataBinding(dataBinding => dataBinding.Ajax().Select("SelectedUser", "UserAdministration", new {userName = ViewData["userName"],roleAction = "Add"}))
.Columns(columns => {
columns.Bound(r => r.RoleName).Template(r =>
{
%>
<%=Html.ActionLink("Edit", "AddRemoveRoles", new { roleName = r.RoleName, roleAction = "Add"})%>
<%
})
.ClientTemplate("<a href='" + Url.Action("AddRemoveRoles", "UserAdministration") + "/<#= RoleName #>Edit</a>").Title("Edit");
columns.Bound(r => r.RoleName).Width(170);
columns.Bound(r => r.RoleDesc).Width(170);
})
.Scrollable()
.Pageable()
.Render();
%>
Thanks,
Netsanet
NotSupportedException.
<% Html.Telerik().Grid(Model.URoleViewModel.Group)
.Name("UnAssignedRoleGrid")
.DataBinding(dataBinding => dataBinding.Ajax().Select("SelectedUser", "UserAdministration", new {userName = ViewData["userName"],roleAction = "Add"}))
.Columns(columns => {
columns.Bound(r => r.RoleName).Template(r =>
{
%>
<%=Html.ActionLink("Edit", "AddRemoveRoles", new { roleName = r.RoleName, roleAction = "Add"})%>
<%
})
.ClientTemplate("<a href='" + Url.Action("AddRemoveRoles", "UserAdministration") + "/<#= RoleName #>Edit</a>").Title("Edit");
columns.Bound(r => r.RoleName).Width(170);
columns.Bound(r => r.RoleDesc).Width(170);
})
.Scrollable()
.Pageable()
.Render();
%>
Thanks,
Netsanet
6 Answers, 1 is accepted
0
Hi Netsanet Gizaw,
This workaround is for assembly version 2010.1.416 and newer. In earlier versions you have to use ClientTemplate only. I am attaching it to this thread.
Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
This workaround is for assembly version 2010.1.416 and newer. In earlier versions you have to use ClientTemplate only. I am attaching it to this thread.
Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Nate
Top achievements
Rank 1
answered on 16 Apr 2010, 03:22 PM
Hi Atanas,
Thanks for your quick response!
But i have problems when i use the ClientTemplate only too............Instead of the checkbox i see the value is displayed. Any idea?
<% Html.Telerik().Grid(Model.URoleViewModel.Group)
.Name("UnAssignedRoleGrid")
.DataBinding(dataBinding => dataBinding.Ajax().Select("SelectedUser", "UserAdministration", new {userName = ViewData["userName"],roleAction = "Add"}))
.Columns(columns => {
columns.Bound(r => r.RoleName).ClientTemplate("<input type='checkbox' name='checkedRecords' value='<#= RoleName #>' />").Title("Check").Width(50).HtmlAttributes(new {style = "text-align:center"});
columns.Bound(r => r.RoleName).Width(170);
columns.Bound(r => r.RoleDesc).Width(170);
})
.Scrollable()
.Pageable()
.Render();
%>
Netsanet
Thanks for your quick response!
But i have problems when i use the ClientTemplate only too............Instead of the checkbox i see the value is displayed. Any idea?
<% Html.Telerik().Grid(Model.URoleViewModel.Group)
.Name("UnAssignedRoleGrid")
.DataBinding(dataBinding => dataBinding.Ajax().Select("SelectedUser", "UserAdministration", new {userName = ViewData["userName"],roleAction = "Add"}))
.Columns(columns => {
columns.Bound(r => r.RoleName).ClientTemplate("<input type='checkbox' name='checkedRecords' value='<#= RoleName #>' />").Title("Check").Width(50).HtmlAttributes(new {style = "text-align:center"});
columns.Bound(r => r.RoleName).Width(170);
columns.Bound(r => r.RoleDesc).Width(170);
})
.Scrollable()
.Pageable()
.Render();
%>
Netsanet
0
Accepted
Hi Netsanet Gizaw,
You have specified the datasource which means the grid is initially bound server side. Client templates are not applied in this case. You have two options:
Kind regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
You have specified the datasource which means the grid is initially bound server side. Client templates are not applied in this case. You have two options:
- Upgrade to the version attached in my previous reply (recommended)
- Do not server-bind the grid:
Use
<% Html.Telerik().Grid<MyType>()
Instead of
<% Html.Telerik().Grid(Model.URoleViewModel.Group)
Kind regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Nate
Top achievements
Rank 1
answered on 16 Apr 2010, 03:49 PM
Atanas you rock!!!!!!!!!!!!
0
RE
Top achievements
Rank 1
answered on 04 Jun 2010, 02:11 PM
Thx, solved my problem!
0
Matthew Reily
Top achievements
Rank 1
answered on 18 Nov 2010, 10:38 PM
Do you think you guys could add a note in your demo descriptions that recommends not to use the "server bind" method? I spent a couple hours banging my head and looking at the documentation before I found this thread.