I'm looking for a way to define a mouse enter event for the expand button on a hierarchy gridview. I have nested grids and a drag and drop functionality. I want to be able to start dragging and then mouse over the + and expand another row to drop into the child gridview. Is this a possibility?
I think I'm basically trying to do the treeview DropExpandDelay in a gridview.
0
Yoan
Telerik team
answered on 19 Aug 2014, 11:43 AM
Hi Mark,
If you want to expand the row when the mouse is over the + button, then you can use GridView's PreviewMouseMove event. Then you can find the underling element, verify it is GridViewToggleButton and expand the row details. Please check the following code snippet for a reference:
var element = e.OriginalSource as FrameworkElement;
var toggleButton = element.ParentOfType<GridViewToggleButton>();
if (toggleButton != null)
{
var row = toggleButton.ParentOfType<GridViewRow>();
if (row != null)
{
row.DetailsVisibility = Visibility.Visible;
}
}
}
I hope tihs helps.
Regards,
Yoan
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.