Hi
In our Silverlight 4 application we use a double click on a grid Viewcell to select all cells of the concerned row. Example:
This works fine. However, some rows in the grid are disabled and the double click event will not execute. Is there a way to catch the event when the row header is clicked (and to get to the item/row)? This would be great.
(This functionality is needed because we have more than 60 - sometimes broad - columns. The use need a way to mark a row when he is scrolling vertically, otherwise he is lost. Selecting the entire row by setting the Current item has proven to work very well. Unfortunately, this does not work when the row is disabled. It would be ok to select the current item, so this is only displayed in the row header. )
Greetings and thanks in advance
In our Silverlight 4 application we use a double click on a grid Viewcell to select all cells of the concerned row. Example:
public class CustomGrid : RadGridView
{
public CustomGrid()
: base()
{
this.AddHandler(GridViewCellBase.CellDoubleClickEvent, new EventHandler<
RadRoutedEventArgs
>(OnCellDoubleClick), true);
}
private void OnCellDoubleClick(object sender, RadRoutedEventArgs args)
{
if (this.GridMode == EGridMode.EditCells)
{
var cell = args.OriginalSource as GridViewCellBase;
if (cell != null && cell.ParentRow != null)
{
var row = cell.ParentRow;
this.CurrentItem = row.Item;
}
}
}
This works fine. However, some rows in the grid are disabled and the double click event will not execute. Is there a way to catch the event when the row header is clicked (and to get to the item/row)? This would be great.
(This functionality is needed because we have more than 60 - sometimes broad - columns. The use need a way to mark a row when he is scrolling vertically, otherwise he is lost. Selecting the entire row by setting the Current item has proven to work very well. Unfortunately, this does not work when the row is disabled. It would be ok to select the current item, so this is only displayed in the row header. )
Greetings and thanks in advance