views:

41

answers:

0

Hi,

I'm using Telerik grid to present memos received by user below is the code

<%Html.Telerik().Grid<UserManagement.Models.SentMemos>() 
    .Name("ReceivedMemos") 
    .Sortable(sorting => sorting 
        .OrderBy(sortOrder => sortOrder.Add(o => o.MemoDate).Descending()))         
    .DataBinding(dataBinding => dataBinding 
        //Ajax binding 
    .Ajax() 
    //The action method which will return JSON 
    .Select("_AjaxBindingReceivedMemos", "OA" ) 

        ). 
        Columns(colums => 
        { 
            colums.Bound(o => o.MemoID).ClientTemplate(Html.ActionLink("Reply", "ReplyMemo", "OA", new { MemoID = "<#=MemoID#>"}, null).ToString()).Title("Reply").Filterable(false).Sortable(false); 
            colums.Bound(o => o.MemoID).ClientTemplate(Html.ActionLink("Acknowledge", "PreviewMemo", "OA", new { id = "<#=MemoID#>"}, null).ToString()).Title("Acknowledge").Filterable(false).Sortable(false); 
            colums.Bound(o => o.Subject).ClientTemplate(Html.ActionLink("<%#=Subject#>", "PreviewMemo", "OA", new { id = "<#=MemoID#>" }, null).ToString()).Title("Subject"); 
            //colums.Bound(o => Html.ActionLink(o.Subject,"PreviewMemo","OA",new{id=o.MemoID},null).ToString()).Title("Subject"); 
            colums.Bound(o => o.FromEmployeeName); 
            colums.Bound(o => o.MemoDate); 
            }) 
    .Sortable() 
    .Filterable() 
     .RowAction((row) => 
     {              
             row.HtmlAttributes.Add("style", "background:#321211;"); 
     }) 
    .Pageable(pager=>pager.PageSize(6)) 
    .PrefixUrlParameters(false)   

       //.ClientEvents(events => events.OnRowDataBound("onRowDataBound")) 
        .Render();          
  %> 

where I am binding third column (Subject) my intention is to make an ActionLink where subject is the display text and i want a dynamic ID coming from <#=MemoID#>. memo id is working fine and gives me a link with dynamic Memo IDs. the problem is with the subject i.e ("<#=Subject#>") is rendered as it is on the screen without mapping to the actual subject of the memo. I have also tried ("<%#=Subject%>") but to no gain. any help is highly appreciated

Regards