Example #1
0
        private void radTreeView1_EditorRequired(object sender, TreeNodeEditorRequiredEventArgs e)
        {
            if (e.Node.Value == DBNull.Value)
            {
                return;
            }

            PropertyHelper helper = (PropertyHelper)e.Node.Value;

            if (helper != null)
            {
                if (helper.ValueType == typeof(System.Single) || helper.ValueType == typeof(ElementShape))
                {
                    e.EditorType = typeof(TreeViewSpinEditor);
                }
                else if (helper.ValueType == typeof(string))
                {
                    e.EditorType = typeof(TreeViewTextBoxEditor);
                }
                else if (helper.ValueType == typeof(Color))
                {
                    e.EditorType = typeof(TreeViewDropDownListEditor);
                }
            }
        }
Example #2
0
 private void radTreeView1_EditorRequired(object sender, TreeNodeEditorRequiredEventArgs e)
 {
     e.Editor = new CustomRadTreeViewEditor();
 }