double click event of datagrid row

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
Sesztak
Posts: 172
Joined: Fri Jun 24, 2016 2:19 am

double click event of datagrid row

Postby Sesztak » Wed Nov 23, 2016 3:44 am

Dear JS-Support,

is there any way to get a double click event of datagrid row ?

in normal WPF we should do it easily, like:
<DataGrid>
<DataGrid.Resources>
<Style TargetType="DataGridRow">
<EventSetter Event="MouseDoubleClick" Handler="Row_DoubleClick"/>
</Style>
</DataGrid.Resources>
</DataGrid>

C#:
private void Row_DoubleClick(object sender, MouseButtonEventArgs e)
{
DataGridRow row = sender as DataGridRow;
// Some operations with this row
}

In CSHTML5 we got error message:
<DataGrid.Resources>
<Style x:Key="uniqKey1233" TargetType="DataGridRow">
<EventSetter Event="MouseDoubleClick" Handler="Row_DoubleClick"/>
</Style>
</DataGrid.Resources>
XAML : 'Failed to create a 'Handler' from the text 'Row_DoubleClick' . '

C#:
// The type or namespace name 'MouseButtonEventArgs' could not be found
private void Row_DoubleClick(object sender, MouseButtonEventArgs e)
{
// 'DataGridRow' is inaccessible due to its protection level
// DataGridRow row = sender as DataGridRow; //

}

So, is there any way or workaround to get double click event of a CSHTML5 datagridrow or datagriditem ?

Thanks for your kind reply in advance,
Best Regards,
Péter
ps: the 'jsTree' is not forgotten, I plant to share my experiences with the community -but these days is extreme busy for me -apprx. 13 working hours / day ..

Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 51 guests

 

 

cron