I have Grid in telerik mvc3, I have Problem Creating Action Link, In Fact when I load the Page it does not show me Action Link, and when I Edit and update The record then It show me Action Link,
Following is the code I am using to go up this Process
I have commented the line that I have tried but Yet I have problem that when I load the page it does not show me Action Link But After Editing the Record
I have done working of ajax Fine now, I just Added Server Binding also in it. and it works
dataBinding.Server().Select("FirstLook", "Contact", new { ajax =ViewData["ajax"] });
dataBinding.Ajax().Select("_AjaxBinding", "Contact").OperationMode(GridOperationMode.Client).Enabled((true))
Now I am having Very Small problem that when I load the Page Telerik Grid Show me LastName Field that must be Linked, but In My Case it is not getting linked, And as Sort the Page or I made Filter then I works And It shows me the Liked LastName, whats up
here Why it not showing Linked Field of LastName
Marked as answer by qqaadir on Jul 06, 2012 09:25 PM
qqaadir
Member
96 Points
150 Posts
Having Problem with clientTemplate Telerik ASP.NEt MVC
Jul 05, 2012 01:37 PM|LINK
Hi,
I have Grid in telerik mvc3, I have Problem Creating Action Link, In Fact when I load the Page it does not show me Action Link, and when I Edit and update The record then It show me Action Link,
Following is the code I am using to go up this Process
columns.Bound(o => o.LastName).ClientTemplate("<a href=\"/Contact/Details/" + "<#=Id#>" + "\">" + "<#=LastName#>" + "</a>").Encoded(false).Title("LastName") ;
I have tried Column template, and Using Template it show me Action Link when I load Page and After Editing it Hide the Records
Whats up here i don't have idea, Some suggestion Please
Thank you
asp.netmvc3
ayodejib
Member
5 Points
57 Posts
Re: Having Problem with clientTemplate Telerik ASP.NEt MVC
Jul 05, 2012 02:19 PM|LINK
Show ur full Telerik datagrid code in order to have full understanding of the error and possible the solution.
asp.netmvc3
qqaadir
Member
96 Points
150 Posts
Re: Having Problem with clientTemplate Telerik ASP.NEt MVC
Jul 05, 2012 02:32 PM|LINK
@(Html.Telerik().Grid <CMg.Data.Contact>(Model) .Name("Contact") .PrefixUrlParameters(false) // .ToolBar(commands => commands.Insert()) .DataKeys(keys => keys.Add(c => c.Id)) .Columns(columns => { columns.Command(commands => { commands.Edit().ButtonType(GridButtonType.Text); commands.Delete().ButtonType(GridButtonType.Text); }).Width(180).Title("Manage"); // columns.Bound(o => o.LastName).ClientTemplate("<a href=\"/Contact/Details/" + "<#=Id#>" + "\">" + "<#=LastName#>" + "</a>").Encoded(false).Title("LastName"); //columns.Template(o => @Html.ActionLink(o.LastName, "Details", new { id = o.Id })).Title("LastName").Width(130); columns.Bound(o => o.LastName).ClientTemplate(Html.ActionLink("<#= LastName #>", "Details", "Contact", new { id = "<#= Id #>" }, null).ToString()).Title("LastName"); columns.Bound(o => o.FirstName).Width(160); columns.Bound(o => o.Address).Width(110); columns.Bound(o => o.CellPhone).Width(110); columns.Bound(o => o.HomePhone).Width(110); }) .DataBinding(dataBinding => dataBinding.Ajax().Update("Edit","Contact" ).Delete("Delete","Contact") ) .Editable(editing => editing.Mode(GridEditMode.InForm)) .Scrollable(scrolling => scrolling.Enabled(true)) .Sortable(sorting => sorting.Enabled(true)) .Pageable(paging => paging.PageSize(10).Enabled(true)) .Filterable(filtering => filtering.Enabled(true)) //.Groupable(grouping => grouping.Enabled(true)) .Footer(true) )I have commented the line that I have tried but Yet I have problem that when I load the page it does not show me Action Link But After Editing the Record
Thank you
asp.netmvc3
qqaadir
Member
96 Points
150 Posts
Re: Having Problem with clientTemplate Telerik ASP.NEt MVC
Jul 06, 2012 01:09 PM|LINK
dataBinding.Server().Select("FirstLook", "Contact", new { ajax =ViewData["ajax"] }); dataBinding.Ajax().Select("_AjaxBinding", "Contact").OperationMode(GridOperationMode.Client).Enabled((true))Now I am having Very Small problem that when I load the Page Telerik Grid Show me LastName Field that must be Linked, but In My Case it is not getting linked, And as Sort the Page or I made Filter then I works And It shows me the Liked LastName, whats up here Why it not showing Linked Field of LastName
qqaadir
Member
96 Points
150 Posts
Re: Having Problem with clientTemplate Telerik ASP.NEt MVC
Jul 06, 2012 09:26 PM|LINK
This problem also done using template().clientTemplate