This question is locked. New answers and comments are not allowed.
Hello,
is there a way to change the cell content after a link click? i want delete the link from dom and instead add a label.
best regards
is there a way to change the cell content after a link click? i want delete the link from dom and instead add a label.
| <% Html.Telerik().Grid( Model ) |
| .Name( "dataGrid" ) |
| .DataKeys( keys => keys.Add( k => k.PersonId) ) |
| .Columns( c => |
| { |
| c.Bound( p => p.PersonId).Width( 80 ).Title( "Id" ).Width( 100 ); |
| c.Bound( p => p.FullName ).Title( "Name" ).Width( 150 ); |
| c.Template( p => |
| {%> |
| <a href="#">Add</a> |
| <%} ); |
| } ) |
| .Sortable() |
| .Render(); %> |
| $(function () { |
| $('#dataGrid tr:has(td) td a').click(function (e) { |
| var row = $(this).parent().parent(); |
| var grid = $(row).parents('.t-grid').data('tGrid'); |
| var data = $('#dataGrid').data[$(grid.$tbody[0].rows).index(row)]; |
| // data is always null??? |
| var id; |
| for (x in grid.dataKeys) |
| id = data[x]; |
| // javscript service call with id |
| // delete the link and add a label |
| }); |
| }); |
best regards