Solved

Design Time: DatagridView Colums does not display the property provided by the extender

Posted on 2008-06-26
1
411 Views
Last Modified: 2013-12-16
Just as simple as that. The Test property is attached to controls, ListView columns, anything I want except for Columns (in Columns Collection Editor of a DataGridView). Why? Is there something I can do?

[ProvideProperty("Test", typeof(IComponent))]

        public partial class Component1 : Component, IExtenderProvider

        {

            private Dictionary<string, string> _commponentsIntlist = new Dictionary<string, string>();
 

            [Browsable(true)]

            [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]

            public Dictionary<string, string> ComponentsAndStatefullProp

            {

                get { return _commponentsIntlist; }

                set { _commponentsIntlist = value; }

            }

            

            public Component1()

            {

                InitializeComponent();

            }
 

            public Component1(IContainer container)

            {

                container.Add(this);

                InitializeComponent();

            }
 

            bool System.ComponentModel.IExtenderProvider.CanExtend(object obj)

            {

                if (obj.GetType() == typeof(Component1)) return false;

                if (obj is IComponent) return true;

                return false;

            }
 

            public string GetTest(IComponent component)

            {

                if (!_commponentsIntlist.ContainsKey(component.ToString()))

                {

                    _commponentsIntlist.Add(component.ToString(), "");

                }

                return (string)_commponentsIntlist[component.ToString()];

            }
 

            public void SetTest(IComponent component, string value)

            {

                if (!_commponentsIntlist.ContainsKey(component.ToString()))

                {

                    _commponentsIntlist.Add(component.ToString(), value);

                }

                else

                    _commponentsIntlist[component.ToString()] = value;

            }

        }

Open in new window

0
Comment
Question by:ripahoratiu
1 Comment
 
LVL 9

Accepted Solution

by:
ripahoratiu earned 0 total points
Comment Utility
OK I find my own answer. Basically the property exposed by the extender is there if you select in the property dropdown one of the column, but not in the columns collection editor. After digging a little bit the MS guys stated that the columns collection editor is not capable of doing that and probably will not be fixed soon.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SQl help with selection 14 43
Expando 4 33
Trouble with References... 5 21
Why don't I see this table in EDMX file? 2 19
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now