This question is locked. New answers and comments are not allowed.
Is it possible to access the attributes of the current object when NOT in the raw string of the client row template? I am trying to add an upload button to a client row template, and I need the async method to know the id of the object in that template
class MyModel {
int Id;
string Name;
}
I know i can use <#= Id #> in the string part of the template, but is there any way to reference it a part of the template that is code?
...
class MyModel {
int Id;
string Name;
}
I know i can use <#= Id #> in the string part of the template, but is there any way to reference it a part of the template that is code?
...
@(Html.Telerik().Grid<MyModel>().ClientRowTemplate( grid => "<div> <#= Name #></div><div>Add attachment: " + Html.Telerik().Upload().Name("foobar") .Async(a => a.Save("Save", "MyModel", new { id = ****HOW DO I GET THE CURRENT ID HERE???***})).ToHtmlString()))