Hi,
I am using the following code to Delete a row from the RadGridView. This works for the first level in the hiarchy. However, on the second level the SelectedItem == null.
==================================
I am using the following code to Delete a row from the RadGridView. This works for the first level in the hiarchy. However, on the second level the SelectedItem == null.
==================================
this
.AddHandler(UIElement.KeyDownEvent, new KeyEventHandler(MouseDownOnCell), true);
private
void MouseDownOnCell(object sender, KeyEventArgs args)
{
if
(args.Key == Key.Delete && this.RadGridView1.SelectedItem != null)
{
MyDataContext.DomainContext.Customers.Remove(RadGridView1.SelectedItem as Customer);
}
}
========================================