title: How to remove/unbind rowSelect event from primefaces datatable
body: <p>My main problem is I want to remove/unbind rowSelect, rowUnselect and rowDblselect events<br>
    from datatable.  </p>
  
  <pre><code>&lt;p:dataTable id="myTable" value="#{myBean.myLazyModel}" var="var" 
          selection="#{myBean.selectedBean}" styleClass="uta-table lightgrey-table"&gt;
  
          &lt;p:column selectionMode="multiple" id="select"
              style="width:2%;text-align:center" /&gt;
  
          &lt;p:column id="namecol" headerText="Name" style="text-align:center"&gt;
              &lt;p:inputText id="name" value="#{var.name}"
                  styleClass="uta-textbox" style="text-align:center"&gt;
              &lt;/p:inputText&gt;
          &lt;/p:column&gt;
  &lt;/p:dataTable&gt;
  </code></pre>
  
  <p>Assume the datatable has only 5 rows. Now I have selected first 4 rows by selecting checkbox (not by clicking on row). If I select 5th row
  by clicking on the row(not selecting the checkbox) then the previous 4 rows are deselected resulting in only 5th row being selected. This is something concerns my client.  </p>
  
  <p>To avoid this problem I thought of unbinding/removing rowSelect event means I should be able to select a row only by selecting checkbox. This same problem persists in the primeface showcase also.  </p>
  
  <p><a href="http://www.primefaces.org/showcase/ui/datatableRowSelectionRadioCheckbox.jsf" rel="nofollow">http://www.primefaces.org/showcase/ui/datatableRowSelectionRadioCheckbox.jsf</a></p>
  
  <p>I tried to unbind/remove rowSelect event in the following two ways using jQuery css selectors  </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
              jQuery(function() {                        
                  $('.lightgrey-table').off("rowSelect");
                  $('.lightgrey-table').off("rowUnselect");
                  $('.lightgrey-table').off("rowDblselect");
  
              });
  &lt;/script&gt;  
  </code></pre>
  
  <p>second way   </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
              jQuery(function() {                        
                  $('.lightgrey-table').unbind("rowSelect");
                  $('.lightgrey-table').unbind("rowUnselect");
                  $('.lightgrey-table').unbind("rowDblselect");
  
              });
  &lt;/script&gt;  
  </code></pre>
  
  <p>both didn't work for me. Could any one help me to resolve this.  </p>
  
  <p>thanks in advance guys </p>