or
private
static
PropertyDescriptorCollection GetPropertyDescriptors(QueryableCollectionView collectionView)
{
...
if
(TypeExtensions.IsCompatibleWith(elementType,
typeof
(ICustomTypeDescriptor)))
//code pass
return
ItemPropertyInfoHelper.GetPropertyDescriptorsForCustomTypeDescriptorElementType(collectionView);
...
}
public
static
PropertyDescriptorCollection GetPropertyDescriptorsForCustomTypeDescriptorElementType(QueryableCollectionView collectionView)
{
var customTypeDescriptor = ItemPropertyInfoHelper.GetCollectionViewRepresentativeItem(collectionView)
as
ICustomTypeDescriptor;
//returns null
if
(customTypeDescriptor !=
null
)
return
customTypeDescriptor.GetProperties(); //Never called when ItemsSource is not set
else
return
null
;
}
private
static
object
GetCollectionViewRepresentativeItem(QueryableCollectionView collectionView)
{
if
(!collectionView.IsEmpty)
return
collectionView.GetItemAt(0);
//collection is empty
else
return
null
;
}
<
telerik:RadGridView.InputBindings
>
<
KeyBinding
Key
=
"A"
Modifiers
=
"Ctrl"
Command
=
"{Binding MyCommand}"
/>
</
telerik:RadGridView.InputBindings
>