                   (let [rank (aget (.getItem dataview (aget args "row"))
                                    _rank)]
                     (put! shared/event-chan {:submission-to-rank rank}))))
+
+    (.subscribe (.-onClick grid)
+                (fn [e args]
+                  (let [elem (.-target e)
+                        row (.getItem dataview (aget args "row"))
+                        elem-data-id (.getAttribute elem "data-id")
+                        data-id (when elem-data-id
+                                  (js/parseInt (.getAttribute elem "data-id")))
+                        id  (aget row _id)
+                        rank (aget row _rank)]
+                    (when (= id data-id)
+                      (put! shared/event-chan
+                            {:submission-to-rank rank})))))
 
     ;; page, filter, and data set-up on the dataview
     (init-sg-pager grid dataview)

                (.invalidateAllRows grid)
                (resizeColumns grid)
                (.render grid)
                (init-sg-pager grid dataview)
                (doseq [elem (sel :.view-record)]
                  (dommy/listen! elem :click (fn [e]
                                               (.preventDefault e)
                                               (js/alert
                                                 (.getAttribute
                                                   (.-target e)
                                                   "data-id"))))))))))))

(defn- render-options
  [options owner colset!]


(defn button-formatter
  [row cell value columnDef dataContext]
  (let [edit-link "/webform"]
    (str
      "<a title='View'>"
      "<i class='fa fa-clone' data-id="value"></i></a>"
      "&nbsp;&nbsp;"
      "<a title='Edit' data-id="value" target='_blank' href='"edit-link"'>"
      "<i class='fa fa-pencil-square-o'></i></a>")))

(def actions-column
  {:id "actions" :field _id :type "text"
