简体   繁体   中英

RadGrid Double Click with Single Click

I have a requirement to fire a client side event on Telerik RadGrid Row Double Click, and an update fetching from server on single click. But Double click event doesn't work. If I remove "EnablePostBackOnRowClick" option, then it works fine. How can I use both? Here is my code

  <ClientSettings AllowGroupExpandCollapse="True" ReorderColumnsOnClient="false" AllowDragToGroup="false"
      AllowColumnsReorder="false" EnablePostBackOnRowClick="true" >
      <ClientEvents OnRowDblClick="RowDblClick" />                  
  </ClientSettings>

One technique is to separate the low-level 'click handler' from 'single-click' and 'double-click' logic, and set window.setTimeout() initially to fire the 'single-click' logic.

If the low-level click handler is invoked again before the timer has fired, then it is is a double-click; and the timer is cancelled.

See Jayesh's example on this forum:

http://www.telerik.com/forums/how-to-detect-single-and-double-click-in-itemcommand-of-radgrid

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM