Access object properties from lists via asp .net object data source
See the question and my original answer on StackOverflowThe official documentation at DataBinder.Eval Method (Object, String) is quite clear about this:
Expression: The navigation path from the container object to the public property value to be placed in the bound control property. This must be a string of property or field names separated by periods, such as Tables[0].DefaultView.[0].Price in C# or Tables(0).DefaultView.(0).Price in Visual Basic
So the second expression should work fine if Colours has an indexer (this[int index]
) property defined.