in my Table-Control which is based on the RadGridView I'm trying to set an AttachedDependencyProperty for each GridViewCell.
My Problem is that I reached my Handler only for Rows of the Type CheckBoxColumn and ComboBoxColumn.
public class Table : RadGridView
EventManager.RegisterClassHandler(typeof(GridViewCellBase), LoadedEvent, new RoutedEventHandler(OnGridViewCellLoaded), true);
new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.Inherits));
2 Answers, 1 is accepted
answered on 26 Mar 2012, 12:39 PM
Generally Loaded event routed strategy is "Direct", so you cannot use such syntax depending on "GridViewCellBase" class. However even with GridViewCell class used in EventManager.RegisterClassHandler method loaded event is not fired. I've added an event handler for Loaded event, and then ClassHandler delegate is invoked. I cannot add Loaded event handler just to support this case (which according to me is a framework issue) since this could lead to some memory leaks. I could suggest you to use dedicated RadGridView.CellLoaded event instead.
Let me know if there is something unclear or using RadGridView.CellLoaded event does not help.
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>