We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

GridTreeControl: Double Click

The GridTreeControl's MouseDoubleClick event seems to fire when the scrollbar is double clicked.

If I pass the MouseButtonEventArgs to the PointToCellRowColumnIndex method, I do get a valid RowColumnIndex returned from this method even though only the scrollbar was double clicked.

How can I avoid this?

Thanks






1 Reply

SN Sankara Narayanan N Syncfusion Team March 6, 2012 04:37 PM UTC

Hi Anand,

Thanks for using Syncfusion products.

We have analyzed your query and you can use the below following code . In case if you want to perform logic when double happens in the grid but not in the scroll bar, then PointToCellRowColumnIndexOutsideCells method can be used and this gives a negative value when double click happens out of the grid.

By checking the row index and column index, you can perform your logic. If this is not your scenario, then let us know the exact scenario and you can find the sample from the attachment.

[Code snippet]

void treeGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
Point p = e.GetPosition(treeGrid);
var cell = this.treeGrid.InternalGrid.PointToCellRowColumnIndexOutsideCells(p,false);
if(cell.RowIndex>0 && cell.ColumnIndex>0)
{
// Your logic
}
}


Please let us know if you have any queries.

Thanks,
Sankar




GTC_Scrollbar_DoubleClick_911c9f03.zip

Loader.
Live Chat Icon For mobile
Up arrow icon