473,394 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

binding a grid to a collection of custom objects

Hi
I'm sorry for my english...

I have a clas that contains a variable number of data stored in a
dictionary. The key of the dictionary is a string that defines the name of
the field.

( varA 12
varB "a string"
varC 12/12/98
.....)

I need to create a binding between a grid and a collection of objects of
this class and have the variables varA, varB, varC as column fields (not the
public properties of the class...)

Any ideas? ICustomTypeDescriptor ? if so, how can i do this?

thanks....

Nov 16 '05 #1
1 1412
Pallet,

I wouldn't recommend implementing ICustomTypeDescriptor on the object
directly, as could cause problems in other areas where reflection is used on
it. Rather, I would implement this interface on another class, and have
that class take a reference to each instance of your object. That other
class would then be responsible for returning the properties based on what
is in your collection (through the implementation of the GetProperties
method).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<Pallet> wrote in message news:e5*************@tk2msftngp13.phx.gbl...
Hi
I'm sorry for my english...

I have a clas that contains a variable number of data stored in a
dictionary. The key of the dictionary is a string that defines the name of
the field.

( varA 12
varB "a string"
varC 12/12/98
....)

I need to create a binding between a grid and a collection of objects of
this class and have the variables varA, varB, varC as column fields (not the public properties of the class...)

Any ideas? ICustomTypeDescriptor ? if so, how can i do this?

thanks....

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: K | last post by:
I created a collection which is derived from ArrayList and implements IBindingList and ITypedList. Then I bound the DataSource of a data grid into the collection. It could show up the data but...
1
by: Joe Jax | last post by:
I'm building my own version of a readonly DataTable, which needs to bind to various controls. My data table class has two main collections (CollectionBase instances): one of columns, one of rows,...
1
by: matty.hall | last post by:
There's a lot of information out there about data-binding UI objects (i.e. derived from Control) to non-UI custom business objects. Is it possible to do the same without any UI being involved at...
1
by: Dot net work | last post by:
Hello. I have an interesting data binding scenario: I have a repeater control. It repeats a typical custom web user control. I also have a collection object, and each collection element...
1
by: Demetri | last post by:
Someone posted the following back in June and I am now doing the same thing. I'll just paste what was asked and see if anyone can give us an answer: ...
0
by: Stephajn Craig | last post by:
I've built a customized collection class that has strongly typed objects in it. I have a collection class called LogEntryCollection with LogEntry objects in it. Each LogEntry object has certain...
1
by: Ruben | last post by:
I have a collection (PersonCollection inherits collectionbase and implements ITypedList it's a collection of Person objects) this collection also implements the IComponent interface, so I can drag...
4
by: Stuart | last post by:
I hope someone can shed some light on an error I've been experiencing for sometime now, but can no longer continue to ignore :-( I've created a custom entity class which implements IEditableObject....
2
by: Merk | last post by:
I'm new to .NET (using 2.0) and was wondering how to go about binding a collection of custom classes to a DataGrid. The class exposes 5 read-only String properties. I would like for each of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.