开发者

RadGrid Double Click with Single Click

开发者 https://www.devze.com 2023-04-09 20:13 出处:网络
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\"EnablePostB

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

0

精彩评论

暂无评论...
验证码 换一张
取 消