void DoubleClicked(jQueryMouseEvent evt) { var tr = new jQuery(evt.Target).Closest("tr"); if(tr.Length == 0) return; var idx = (int) tr.Data("row-id"); if(!rowBindings.ContainsKey(idx)) return; var obj = rowBindings[idx]; DoubleClick?.Invoke(this, obj); }
void Clicked(jQueryMouseEvent evt) { var tr = new jQuery(evt.Target).Closest("tr"); if(tr.Length == 0) return; var idx = (int) tr.Data("row-id"); if(!rowBindings.ContainsKey(idx)) return; var obj = rowBindings[idx]; Click?.Invoke(this, obj); if(Select != null) { tr.Parent().Children(".table-row-selected").RemoveClass("table-row-selected"); tr.AddClass("table-row-selected"); Select(this, obj); } }