Custom GridViewDataColumn

2 posts, 0 answers
  1. dttanh
    dttanh avatar
    13 posts
    Member since:
    Aug 2012

    Posted 11 Nov 2011 Link to this post


    I created a custom GridViewDataColumn like this:
    public class EmpGridViewActionColumn : EMPGridViewDataColumn
        public static readonly DependencyProperty ActionsProperty =
            new PropertyMetadata(null, new PropertyChangedCallback(ActionsValueChange))
        public IList<ActionData> Actions
            get { return (IList<ActionData>)GetValue(ActionsProperty); }
            set { SetValue(ActionsProperty, value); }
        private static void ActionsValueChange(DependencyObject source, DependencyPropertyChangedEventArgs e)
            if (e.NewValue != null)
                ((EmpGridViewActionColumn)source).Actions = (IList<ActionData>)e.NewValue;

    And in xaml:
    <myControls:EmpGridViewActionColumn Header="Type" Width="120">
                        <myControls:EMPActionDataContract Name="Test"/>
    At run time: I encounter error at line:
    <myControls:EMPActionDataContract Name="Test"/>

    Does anyone have any idea or solution?
  2. Rossen Hristov
    Rossen Hristov avatar
    2477 posts

    Posted 14 Nov 2011 Link to this post

    Hello Tuan Anh,

    Can you please clarify how is that problem specifically related to Telerik controls? If you do the same thing on another object does your XAML work?

    Best wishes,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top