HI
We use Silverlight 4 and the RadGridview. Our Grid has lots of columns and when scrolling it is helpfull if the concerned row is mared/selected. Selection works normally fine but when various cells are in edit mode, this no longer works.
The selection settings of our grid are as follows:
I tried to find a solution for this and this is the best i have come up with:
However, this solution does not work properly because as soon as the user selects some fields, the CurrentItem is changed.
The best solution would be, to have the user click on the rowHeader (RowIndicater-> the first column that shows no data) and thus marks the row (via >> sign that appears for the currentItem). Is this possible?
Greetings and thanks in advance
We use Silverlight 4 and the RadGridview. Our Grid has lots of columns and when scrolling it is helpfull if the concerned row is mared/selected. Selection works normally fine but when various cells are in edit mode, this no longer works.
The selection settings of our grid are as follows:
IsReadOnly =
false
;
SelectionMode = SelectionMode.Extended;
SelectionUnit = GridViewSelectionUnit.Cell;
// important to set "AllSelectedCells" to ensure Excel-Like behaviour
ClipboardPasteMode = (GridViewClipboardPasteMode.AllSelectedCells | GridViewClipboardPasteMode.Default);
I tried to find a solution for this and this is the best i have come up with:
datagrid.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;
dataGrid.CurrentItem = row.Item;
}
}
}
However, this solution does not work properly because as soon as the user selects some fields, the CurrentItem is changed.
The best solution would be, to have the user click on the rowHeader (RowIndicater-> the first column that shows no data) and thus marks the row (via >> sign that appears for the currentItem). Is this possible?
Greetings and thanks in advance