This might be quite a strange question since usually people bind only complex types to a gridview. But I need to bind a List of Int (the same is for strings). Usually, as the property to bind one uses the name of the property of the object, but when using a Int or a String, the value is exactly the object itself, not a property.
What is the ‘name’ to get the value of the object? I tried ‘Value’, ” (empty), ‘this’, ‘item’ but no luck.
I’m referring to a gridview in a web form.
Update
There’s a related Stack Overflow question, How to bind a List to a GridView.
<BoundField DataField='!' />may do the trick (sinceBoundField.ThisExpressionequals ‘!’).