none
datagrid row double click

Answers

All replies

  • Hi,

    Silverlight does not implement row double click so that you can use SelectionChanges event handler.

    Wednesday, May 18, 2011 11:19 PM
  • There are tutorials fr double click on data grid which takes custom class type to know the click events and all.

    But i have an easy solution. For double click, in ur single click event you need to have a condition to compare the selected rows.

    What i did is, i have a dispatcher timer to calculate the difference of clicks. I have choosed 0.2 seconds. Take an integer count, increment it when the event is called first time and stop the timer, clear the integer when the count is >=2. if count is `, inside the tick function of timer, save the selected row of the grid into a variable if count is 1, if the count is 2 or greater, compare the previouslly selected row to presently selected row and see if they are same, if they are same perform double click function, clear the values of count and selected rows  after count is 2 or more,

    u can get exact double click as no one can click more than 2 times in 0.2-0.5 seconds, simply my method is compare selected rows if limited time, if same perform action.

     

    Friday, May 20, 2011 11:00 AM
  • Hi give a look at this :

    http://www.codeproject.com/KB/silverlight/doubleClickDataGridSL.aspx

    if not enough see these :

    http://www.michaelsnow.com/2010/05/10/silverlight-tip-of-the-day-17-double-click/

    http://dotnetspeak.com/index.php/2010/07/implementing-double-click-in-silverlight-datagrid/

    http://www.dansoltesz.com/post/2010/02/19/Silverlight-datagrid-double-click-behavior.aspx


    Friday, May 20, 2011 11:09 AM
  • Now in Silverlight 5 you can handle the e.ClickCount in the MouseLeftButtonDown event.

    if (e.ClickCount == 2)

    {

          // Double click event

    }

    more info: http://www.silverlighthostingnews.com/index.php/archives/440

    Thursday, January 26, 2012 8:08 AM
  • I have a more complete solution for working with DataGrid and rows, right here: http://stackoverflow.com/a/9878123/178620

    Monday, March 26, 2012 3:34 PM
  • if (e.ClickCount == 2)

    {      // Double click event }

    This does not work as the row does not raise the event - it makes the whole clikck count xcercise a waste of time!

    Friday, May 25, 2012 7:17 PM
  • @Mycroft Did you try my solution, as posted on StackOverflow?

    Friday, June 01, 2012 12:53 AM