Click here to Skip to main content
15,116,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<pre lang="HTML">@(
 Html.Telerik().Grid(Model)
              .Name("RolesGrid")
              .DataKeys(keys => keys.Add(r => r.ID))
              .ToolBar(command => command.Insert())
              .DataBinding(dataBinding => dataBinding.Ajax()
                  .Select("TelerikAjax", "Role")
                  .Insert("Insert", "Role")
                  .Update("Update", "Role")
                  .Delete("Delete", "Role"))
              .Sortable(sorting => sorting
                   .SortMode(GridSortMode.SingleColumn))
              .Pageable(paging => paging
                   .Style(GridPagerStyles.NextPreviousAndNumeric)
                   .Position(GridPagerPosition.Bottom)
                   .PageSize(3))
               .Columns(columns =>
               {
                   columns.Bound(r => r.ID);
                   columns.Bound(r => r.Name).Width(210);
                   columns
                          .Template(r =>
                                        {
                                            @<textarea id='roleReamrk' name='roleRemark' rows='3' cols='50'>@r.Remark</textarea>;
                                        })
                          .ClientTemplate("<textarea id='roleReamrk' name='roleRemark' rows='3' cols='50'><#= Remark #></textarea>").Width(210);
                   columns.Command(commands =>
                   {
                       commands.Edit();
                       commands.Delete();
                   }).Width(180);
               })
               .Editable(editing => editing
                     .Mode(GridEditMode.PopUp))
               .Selectable()
 )
@r.Remark is wrong.
Only assignment,call,increment,decreent,and new object expressions can be used as statement
Posted

1 solution

HTML
columns
                         .Bound(r => r.Remark)
                         .Template(r => @Html.Raw("<textarea id='roleReamrk' name='roleRemark' rows='3' cols='50'>"+r.Remark+"</textarea>"))
                         .ClientTemplate("<textarea id='roleReamrk' name='roleRemark' rows='3' cols='50'><#= Remark #></textarea>").Width(210);
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900