I would like to select a row using javascript.
Could you show me the way how to do this?
I've tried to use but there was no effect:
.RowAction(row =>
{
row.Selected = row.DataItem.Id.Equals(Model.Organization.Id);
}
my grid:<%
= Html.Telerik().Grid<Wasko.Prezydencja.SystemAkredytacji.Model.Organization>()
.Name(
"OrganizationChoiseGrid")
.DataKeys(keys => { keys.Add(o => o.Id); })
.Columns(columns =>
{
columns.Bound(o => o.Id).Hidden(
true);
columns.Bound(o => o.Name);
columns.Bound(o => o.City.DictionaryValue.Value);
columns.Bound(o => o.Street);
columns.Bound(o => o.Number);
})
.DataBinding(dataBinding => dataBinding.Ajax()
.Select(
"AjaxSelect_OrganizationChoiseGrid", "Accreditations"))
.EnableCustomBinding(
true)
.Pageable(p => p.Enabled(
false))
.Sortable(s => s.Enabled(
false))
.Filterable(f => f.Enabled(
false))
.Selectable(e=>e.Enabled(
true))
.ClientEvents(events => events.OnRowDataBound("onRowDataBound"))
)
%>
<script type="text/javascript">
function onRowDataBound(e) {
?? HOW SELECT A ROW?
}
</script>