I have a grid and i bind a clientside event to the rowselect event. This gets the value of the first invisible column. Works fine but when i group the grid the first column is empty. I guess the grouping puts a column infront of it. Is there a work around this problem?
@(Html.Telerik().Grid<
CaseLawViewModel>()
.DataBinding(dataBinding => dataBinding.Ajax().Select(
"List", "Caselaw"))
.Name(
"Grid")
.Sortable(sorting => sorting
.SortMode(
GridSortMode.MultipleColumn))
.ClientEvents(events => events.OnRowSelected(
"onRowSelect"))
.Filterable()
.Selectable()
.Groupable()
.Scrollable(p => p.Enabled(
true).Height(600))
.Columns(columns =>
{
columns.Bound(o => o.Id).Hidden(
true);
columns.Bound(o => o.Number).Width(200);
columns.Bound(o => o.CaseLawDate).Format(
"{0:d}");
columns.Bound(o => o.Court);
columns.Bound(o => o.Parties);
columns.Bound(o => o.Articles);
columns.Bound(o => o.Keywords);
columns.Bound(o => o.Id).ClientTemplate(
"<a href='/CaseLaw/Details/<#= Id #>'>details</a>").Title("Action");
}))
function onRowSelect(e) {
var row = e.row;
selectedId = row.cells[0].innerHTML;
}