This question is locked. New answers and comments are not allowed.
I cannot get the following code to fire clientside events, grid renders fine,pages sorts etc, any help appriciated (using latest version) : <%= Html.Telerik().Grid<PersonSearchListModel>() |
.Name("Test") |
.Columns(columns => |
{ |
columns.Bound(c => c.PersonID).Width(1); |
columns.Bound(c => c.FirstName).Width(5); |
columns.Bound(c => c.MiddleName).Width(4); |
columns.Bound(c => c.LastName).Width(5); |
columns.Bound(c => c.Phone).Width("50"); |
columns.Bound(c => c.Address).Width(200); |
columns.Bound(c => c.SSN).Width(50); |
columns.Bound(c => c.HICN).Width(10); |
columns.Bound(c => c.DOB).Width(20); |
columns.Bound(c => c.EnrollmentStatus).Width(20); |
columns.Bound(c => c.AuthorizedRep).Width(20); |
columns.Bound(c => c.AuthorizedRepPhone).Width(20); |
}).ClientEvents(events => events.OnLoad("onLoad").OnDataBinding("onDataBinding"). |
OnRowDataBound("onRowDataBound"). |
OnRowSelected("onRowSelected"). |
OnDataBound("onDataBound")) |
.Selectable() |
.BindTo((IEnumerable<PersonSearchListModel>)Model) |
.Pageable(ww=> ww.PageSize(25)) |
.DataKeys(keys=> keys.Add(my=>my.PersonID)) |
.Sortable() |
%> |
<script type="text/javascript"> |
function onRowSelected(e) { |
var customerID = e.row.cells[0].innerHTML; |
alert(customerID); |
// update ui text |
// $('#customerID').text(customerID); |
// rebind the related grid |
//ordersGrid.rebind({ |
// customerID: customerID |
//}); |
} |
</script> |