Keyboard arrow selection GridDataControl with only UnboundColumns

Hi,

I have a grid with unbound columns and an ItemsSource defined. Selection with the mouse is fine but Im having problems implementing the Keyboard arrow keys for selection.

It fires the recordsselectionchanged event but the GridDataControl.SelectedItems/GridDataControl.SelectedItem is always empty after selecting using the Keyboard Arrows. Even e.AddedItems for the RecordSelectionChanged event args is Empty.

I attached a sample of a grid close to my implementation.



Thanks,
Rich



GridKeyBoardArrowSelection_fb7c486d.zip

1 Reply

RA Rajasekar Syncfusion Team April 20, 2012 11:16 AM UTC

Hi Rich,

Sorry for the inconvenience, we are able to reproduce the issue and the fix for this issue will be available in our upcoming version 2012 Vol2 which will be out by first week of May.

Till that, you can use the below workaround,

gridDataControl1.CurrentCellActivated += new Syncfusion.Windows.ComponentModel.GridRoutedEventHandler(gridDataControl1_CurrentCellActivated);

void gridDataControl1_CurrentCellActivated(object sender, Syncfusion.Windows.ComponentModel.SyncfusionRoutedEventArgs args)
{
var item = (gridDataControl1.Model[this.gridDataControl1.Model.CurrencyManager.CurrentCell.RowIndex, this.gridDataControl1.Model.CurrencyManager.CurrentCell.ColumnIndex] as GridDataStyleInfo).CellIdentity.RecordEntry.Data as Models.Data;
selectedRow.Text = item.Number1.ToString();
}


Please let us know if you have any queries.

Thanks,
Rajasekar



Loader.
Up arrow icon