[Reposted here as probably more appropriate than
"microsoft.public.vb.controls.databound"]
Could anyone help with the following scenario?
- I have a class that exposes a collection (a Hashtable actually) as a
property.(called Custom).
- I am custom binding a WinForms DataGrid control to a collection of
instances of this class.
- I have discovered that I need to set the mapping name of the
DataGridTableStyle to that of the collection class (ArrayList in my case).
- I can bind columns to "simple" properties of the class by setting the
mapping name equal to the column name.
- What I'd like to do is bind a column to an element in the Hashtable. I
have tried various guesses at the syntax but none seem to work, e.g.:
Custom["Gender"], Custom.Item("Gender") and even just Custom.Gender.
Any ideas, or is this just not possible?
Thanks in advance,
Paul.
Alexander Shirshov - 20 Mar 2005 16:58 GMT
Paul,
It's possible but... elaborate. Have a look at this thread:
http://discuss.develop.com/archives/wa.exe?A2=ind0502C&L=DOTNET-WINFORMS&P=R4310&I=-3
HTH,
Alexander
> [Reposted here as probably more appropriate than
> "microsoft.public.vb.controls.databound"]
[quoted text clipped - 17 lines]
> Thanks in advance,
> Paul.
Paul Bartlett - 21 Mar 2005 09:48 GMT
Thanks for that, Alexander. I'd looked at this interface in the past, but
for some reason had got it into my head that the grid would not use it...
- Paul.