This question is locked. New answers and comments are not allowed.
In Telerik MVC 3.0 Grid (Razor engine)
How can i access the data after grid binding.
I am using Detailed view tab
using below code.
How can i access the data after grid binding.
I am using Detailed view tab
using below code.
items.Add().Text("Additional Tab").Content(@<text>@(Html.Telerik().Grid<Models.PModel>().Name("Additional_<#= AddressID #>").DataBinding(dataBinding => dataBinding.Ajax().Select("Action", "Controller", new { ID = "<#= ID #>" })).Pageable().Sortable().Columns(columns =>{columns.Bound(e => e.Name).Title("Name").Width(150);columns.Bound(e => e.Email).Title("Email");columns.Bound(e => e.Status).Title("Prescriber Status");columns.Template(e => e.ID).ClientTemplate(Ajax.ActionLink("Edit", "EditDetails", new {ID = "<#= ID #>", PID = "<#= PID #>" }, new AjaxOptions{OnSuccess = "LoadAddEditForm",UpdateTargetId = "ShowAddEditFormDialogModel",InsertionMode = InsertionMode.Replace}, new { @class = "button" }).ToString());}).NoRecordsTemplate("No additional added for this"))@Ajax.ActionLink("Add New", "AddEdit", "Controller", new { ID = "<#= ID #>"},new AjaxOptions{OnSuccess = "LoadAddEditForm",UpdateTargetId = "ShowAddEditFormDialogModel",InsertionMode = InsertionMode.Replace}, new { @class = "button", id="AjaxAddNewButton" })</text>);
Now the Problem is,, if you notice i have added a Ajax.Action link after the grid binding.
@Ajax.ActionLink("Add New", "AddEdit", "Controller", new { ID = "<#= ID #>"},
new AjaxOptions
{
OnSuccess = "LoadAddEditForm",
UpdateTargetId = "ShowAddEditFormDialogModel",
InsertionMode = InsertionMode.Replace
}, new { @class = "button", id="AjaxAddNewButton" })
In this Ajax Link I can get the value of object new { ID = "<#= ID #>"}
as I am trying to access the <#= ID #> after the grid binding, it is not rendering the value.
How can i get this work?
Any help would be greatly appreciated.
Thanks