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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridTreeControl: Double Click

Thread ID:

Created:

Updated:

Platform:

Replies:

102750 Feb 28,2012 03:26 PM UTC Mar 6,2012 04:37 PM UTC WPF 1
loading
Tags: GridControl
anand rengarajan
Asked On February 28, 2012 03:26 PM UTC

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






Sankara Narayanan N [Syncfusion]
Replied On 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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;