Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataMember Implementation in Design Time

Status
Not open for further replies.

tosberg

IS-IT--Management
Oct 31, 2001
42
US
Here's the skinny:
I want to implement a DataMember and DataSource property for a control i'm building. In design time, I get a drop down list box for the DataSource property but cannot get one for the DataMember property. If you look at MSDN documentation on the DataMember property you'll see that this is what it says it should look like: 'Public Property DataMember as String'. When I code it like that in my class, it does not drop down a list box of items(either based upon the DataSource property or none) to choose from. If you plop a DataGrid on a form and click on the DataMember in design time you get a drop down list box. I would like to know how MS implements the DataMember property so it does this in design time. The documentation specifies that it returns a list/collection, but a String is returned as the default. How can the DataMember have a list box to choose from if it only returns a string? Am I missing an attribute or something? If anybody can help me or point me in the right direction it would be greatly appreciated. thanks!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top